Fork and record the pid of the child. **/
| 590 | |
| 591 | /** Fork and record the pid of the child. **/ |
| 592 | pid_t do_fork(void) |
| 593 | { |
| 594 | pid_t newpid = fork(); |
| 595 | |
| 596 | if (newpid != 0 && newpid != -1) { |
| 597 | all_pids[num_pids++] = newpid; |
| 598 | } |
| 599 | return newpid; |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * Kill all children. |
no outgoing calls
no test coverage detected