I just have a question and I am wondering if anyone knows something I could do that might help me.

I am writting a program, that sends out a bunch of data, then expects to get that data back, it is for testing throughput of loopback devices. anyway I am using fork to split up the sending and recving processes something like this...

switch( fork())
{
case 0:
recvd_bytes += recv_proccess();
_exit( 0 );
break;
case -1:
error;
break;
default:
sent_bytes = send_some_crap_routine();
wait( 0 )
break;
}

I also have a timer for how long each process takes. my problem is: from within the child task I can accurately tell how many bytes I have received, but once that task exits, the variable for sent bytes gets reinitialized to 0. and I can't figure out how to pass the result from the child function back to the parent program...

any pointers ???

thanks

matt
[email protected]