Commit 4ff14b90 authored by Taddeüs Kroes's avatar Taddeüs Kroes

- Implemented OS ass3 step 6 correctly by moving wait-statement.

parent 06da5243
...@@ -170,12 +170,12 @@ main(int argc, char * argv[]) ...@@ -170,12 +170,12 @@ main(int argc, char * argv[])
perror("Cannot write to pipe \n"); perror("Cannot write to pipe \n");
exit(1); exit(1);
} }
if( c == 'P' )
wait(NULL);
} }
else else
{ {
if( c == 'P' )
wait(NULL);
pid_t child_id; pid_t child_id;
kiddoCount++; kiddoCount++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment