[SOLVED] CS /* Runs 4 child-linear processes at once. */

$25

File Name: CS_/*_Runs_4_child-linear_processes_at_once._*/.zip
File Size: 442.74 KB

5/5 - (1 vote)

/* Runs 4 child-linear processes at once. */

#include
#include tests/lib.h
#include tests/main.h

#define CHILD_CNT 4

void
test_main (void)
{
pid_t children[CHILD_CNT];
int i;

for (i = 0; i < CHILD_CNT; i++) CHECK ((children[i] = exec (“child-linear”)) != -1, “exec “child-linear””);for (i = 0; i < CHILD_CNT; i++) CHECK (wait (children[i]) == 0x42, “wait for child %d”, i);}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS /* Runs 4 child-linear processes at once. */
$25