Commit f0b0d329 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen

Merge branch 'master' of ssh://vo20.nl/git/uva

parents 5296f7b1 f9a481b0
...@@ -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++;
...@@ -192,8 +192,8 @@ main(int argc, char * argv[]) ...@@ -192,8 +192,8 @@ main(int argc, char * argv[])
gup(log1, log2, pipe_id, kiddoCount); gup(log1, log2, pipe_id, kiddoCount);
break; break;
default: default:
fprintf(log1, "Started child process %d \n", child_id); fprintf(log1, "Started child process %d with id %d \n", kiddoCount, child_id);
fprintf(log2, "Started child process %d \n", child_id); fprintf(log2, "Started child process %d with id %d \n", kiddoCount, child_id);
} }
} }
} }
......
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