Hello
I am Alireza .I develop a program for  sending  and
 receiving data via two child as below:
 main(){//parent
  if(!fork()){
   sendto(sd1,...);
   recvfrom(rd1,...);
   exit(0);
  }
  if(!fork()){
   sendto(sd2,...);
   recvfrom(rd2,...);
   exit(0);
  }
 while(waitpid(-1,NULL,WUNTRACED));//wait for childs
 ....
 } 
  In above solution time of waiting for childs is
about milisecond but when i wrote program without any
child (as below),program execution time is about
 microsecond.
 main(){
   sendto(sd1,...);
   recvfrom(rd1,...);
   exit(0);
   sendto(sd2,...);
   recvfrom(rd2,...);
  }
 Note :sd1,rd1,sd2,rd2 are DGRAM sockets;


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to