Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: fork, programirane


  • Subject: Re: lug-bg: fork, programirane
  • From: rsd@xxxxxxxxxxxxx (Dimo Dimitrov-DataManagement)
  • Date: Thu, 4 May 2000 23:40:50 +1000


zdrawej,

"waitpid" triabwa da e w parent, a ne w child processa. Izpolzwai:

               if (!fork())
               { /* this is the child process */
                  if (send (new_fd, "Hello, world! \n" , 14, 0) == -1 )
                  {
                    perror ("send");
                    close(new_fd);
                    exit(0);
                  }
               }
               else
               {
                  close(new_fd); /* parent doesn't need this */
                  while (waitpid(-1, NULL, WNOHANG) > 0 ); // clean up child
process
               }

chao : Dimo Dimitrov

<HR>
<UL>
<LI>application/x-pkcs7-signature \\\\\\\\\ \\\\: smime.p7s
</UL>

==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx UNSUBSCRIBE LUG-BG
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora


 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.