diff options
author | Maxime de Roucy <maxime.deroucy@oxalide.com> | 2016-10-12 22:38:51 +0200 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2017-09-05 16:16:28 -0400 |
commit | 3ef9795dc5e603cf2ba331ac2b1f72a725a9e19b (patch) | |
tree | 47fba2f87c0c8c47ecdab0403b1119a0a9618bbc /tools | |
parent | c769584b0db73332386e715b91da2d9bb469f45c (diff) | |
download | gnome-session-3ef9795dc5e603cf2ba331ac2b1f72a725a9e19b.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gnome-session-inhibit.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |