From 8fe143741e13f36d42de9a1c966b46b73e6da395 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Tue, 5 Feb 2019 21:24:32 +0000 Subject: [PATCH] Add a required NULL to execl And add a more descriptive error for issue #100 --- daemon/gamemode-tests.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/gamemode-tests.c b/daemon/gamemode-tests.c index 68cbd26..5324306 100644 --- a/daemon/gamemode-tests.c +++ b/daemon/gamemode-tests.c @@ -182,8 +182,11 @@ static int run_dual_client_tests(void) int child = fork(); if (child == 0) { /* Relaunch self with -r (request and wait for signal) */ - if (execl(mypath, mypath, "-r") == -1) { - fprintf(stderr, "ERROR: failed to re-launch self with execv: %s\n", strerror(errno)); + if (execl(mypath, mypath, "-r", (char *)NULL) == -1) { + fprintf(stderr, + "ERROR: failed to re-launch self (%s) with execv: %s\n", + mypath, + strerror(errno)); return -1; } }