diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2016-04-28 09:17:39 +0200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2016-04-28 09:17:39 +0200 |
commit | 82da7d7d5caaac2675d94017ccf2afc5429516c7 (patch) | |
tree | b5d95d93c27dc7d77ea9471042ec44cd715e4e7d /src/seat.c | |
parent | 173bd54e356681cd0c1bd7be4b22c75fb6d8a68c (diff) | |
download | lightdm-git-82da7d7d5caaac2675d94017ccf2afc5429516c7.tar.gz |
Use GSubprocess instead of g_spawn_async - it doesn't throw a compiler warning about the args
Diffstat (limited to 'src/seat.c')
-rw-r--r-- | src/seat.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -405,15 +405,14 @@ emit_upstart_signal (const gchar *signal) { g_return_if_fail (signal != NULL); g_return_if_fail (signal[0] != 0); - const gchar* argv[] = {"initctl", "-q", "emit", signal, "DISPLAY_MANAGER=lightdm", NULL}; + GSubprocess *p; if (getuid () != 0) return; /* OK if it fails, probably not installed or not running upstart */ - g_spawn_async (NULL, argv, NULL, - G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, - NULL, NULL, NULL, NULL); + p = g_subprocess_new (G_SUBPROCESS_FLAGS_STDERR_SILENCE, NULL, "initctl", "-q", "emit", signal, "DISPLAY_MANAGER=lightdm", NULL); + g_object_unref (p); } static void |