Help with fork, wait, kill in C
Hi all,
Edit for brevity: My current code: Code:
for( x = 0; x < 5; x++ ) { 1. Fork a child that will execute pcap_dispatch and return when a packet is captured 2. Have the parent wait for pehaps a second for the child to return and if it does not, then kill it 3. Implement temp_mac as shared memory so that when the child's pcap_dispatch call in turn calls pcap_callback_fct, that last will be able to write to memory space that the parent can read. There, I think I have removed excess varbiage. TIA! |
I'm trying this:
Code:
pid_t child_pid; |
All times are GMT -5. The time now is 09:45 PM. |