diff --git a/execexample.c b/execexample.c index 63d86d3..82f2bbc 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;