aboutsummaryrefslogtreecommitdiffstats
path: root/csci4061/092120_breakout/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--csci4061/092120_breakout/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/csci4061/092120_breakout/main.c b/csci4061/092120_breakout/main.c
index e5577dd..8d8e08d 100644
--- a/csci4061/092120_breakout/main.c
+++ b/csci4061/092120_breakout/main.c
@@ -26,8 +26,10 @@ int main(int argc, char **argv) {
pid_t pid;
for (int i=0; i<n; i++) {
pid = fork();
- if (pid != 0) {
- printf("%d\n", getpid());
+ if (pid == 0) {
+
+ } else {
+printf("%d\n", getpid());
execl("/bin/echo", "/bin/echo", "hello", "there", NULL);
}
}