From 3ef9795dc5e603cf2ba331ac2b1f72a725a9e19b Mon Sep 17 00:00:00 2001 From: Maxime de Roucy Date: Wed, 12 Oct 2016 22:38:51 +0200 Subject: gnome-session-inhibit: fix child cmd arguments int execvp(const char *file, char *const argv[]); The execv(), execvp(), and execvpe() functions provide an array of pointers to null-terminated strings that represent the argument list available to the new program. The first argument, by convention, should point to the filename associated with the file being executed. In the above paragraph "The first argument" is argv[0] (not the first parameter of the execvp function). https://bugzilla.gnome.org/show_bug.cgi?id=772825 --- tools/gnome-session-inhibit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/gnome-session-inhibit.c b/tools/gnome-session-inhibit.c index 1c7a56da..d1d3bc60 100644 --- a/tools/gnome-session-inhibit.c +++ b/tools/gnome-session-inhibit.c @@ -142,7 +142,7 @@ wait_for_child_app (char **argv) if (pid == 0) { - execvp (*argv, argv + 1); + execvp (*argv, argv); g_print (_("Failed to execute %s\n"), *argv); exit (1); } -- cgit v1.2.1