From 5cdd22742467c8c35e7b4f042d9439c445ee61c3 Mon Sep 17 00:00:00 2001 From: John Breaux Date: Mon, 21 Feb 2022 19:53:51 -0600 Subject: [PATCH] syscalls: improve printf before child execl --- syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syscalls.c b/syscalls.c index 6ce1439..a6c0bf0 100644 --- a/syscalls.c +++ b/syscalls.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { /* Prepare to hand over control over to ls, with the arguments "-la" */ char *command = "/bin/ls", *argv1 = "-la"; - printf("[CHILD ]: execl(%s, %s, NULL);\n", command, argv1); + printf("[CHILD ]: execl(%s, %s, %s, NULL);\n", command, command, argv1); /* execl takes the command, the arguments, and a null-pointer terminator argument. argv[0] is the path to the command