Commit ee76567d authored by Taddeüs Kroes's avatar Taddeüs Kroes

- Worked on OS ass3.

parent 0cb7be9e
......@@ -131,7 +131,7 @@ main(int argc, char * argv[])
if( pipe(pipe_id) )
{
fprintf(stderr, "Error %d occured while createing the pipe \n", errno);
fprintf(stderr, "Error %d occured while creating the pipe \n", errno);
exit(1);
}
......@@ -168,10 +168,6 @@ main(int argc, char * argv[])
{
break;
}
else if( c == 'P' )
{
wait(NULL);
}
else if( c != 'f' )
{
if( write(pipe_id[1], &c, 1) != 1 )
......@@ -182,6 +178,9 @@ main(int argc, char * argv[])
}
else
{
if( c == 'P' )
wait(NULL);
pid_t child_id;
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