diff options
author | Matthew Strapp <msattr@gmail.com> | 2020-09-28 08:07:55 -0500 |
---|---|---|
committer | Matthew Strapp <msattr@gmail.com> | 2020-09-28 08:07:55 -0500 |
commit | bd78d0ac699fb85d9079a7a39477459ae15e9055 (patch) | |
tree | c82d595a638afadb484c0766af719a4b1af8cb78 /csci4061 | |
parent | Do second breakout (diff) | |
download | homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar.gz homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar.bz2 homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar.lz homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar.xz homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.tar.zst homework-bd78d0ac699fb85d9079a7a39477459ae15e9055.zip |
no message provided
Diffstat (limited to 'csci4061')
-rw-r--r-- | csci4061/092120_breakout/main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/csci4061/092120_breakout/main.c b/csci4061/092120_breakout/main.c index 835dd88..e5577dd 100644 --- a/csci4061/092120_breakout/main.c +++ b/csci4061/092120_breakout/main.c @@ -1,10 +1,7 @@ /* CSci 4061 - Recitation 2 - 21st Sept 2020 -Full Name : x500 -Full Name : x500 -Full Name : x500 -Full Name : x500 -Matthew Strapp : strap012 +Breakout 1 +An iditoic loner's lone attempt */ #include <stdio.h> @@ -35,7 +32,9 @@ int main(int argc, char **argv) { } } // parent waits for all child processes to terminate - wait(NULL); + for (int i=0; i<n; i++) { + wait(NULL); + } // parent create child process // call execv on 'ptime' executable // hint: similar to 'echo' usage in slide pid = fork(); |