From 9abdac5826fa89f72674ee6d3dc723c48ede8d69 Mon Sep 17 00:00:00 2001 From: KirtapGeno Date: Fri, 28 Sep 2018 13:14:35 -0500 Subject: [PATCH] Update execexample.c --- execexample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/execexample.c b/execexample.c index 63d86d3..764cd88 100644 --- a/execexample.c +++ b/execexample.c @@ -5,11 +5,13 @@ int main() { char *argsarray[] = {"/bin/ls", "-l", (char *)0}; + printf("look \n"); int pid = fork(); if (pid == 0) { printf("Child with pid %d, about to exec ls\n", getpid()); execv(argsarray[0], argsarray); + printf("look \n"); } else { printf("I am the parent. I am waiting for my child %d to die.\n", pid); int status;