diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-04-08 14:56:19 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-04-08 14:56:19 +0200 |
commit | 369fcf25cc169883ba0ba2d133487fb47b7d5dbb (patch) | |
tree | 6f944227f691b77f99e65f71054f969002be84ad /src/seat.c | |
parent | dfff01b6c63529ea265e4a0046454dfca18e2cbb (diff) | |
download | lightdm-git-369fcf25cc169883ba0ba2d133487fb47b7d5dbb.tar.gz |
Quiesce initctl errors when not running under upstart
Diffstat (limited to 'src/seat.c')
-rw-r--r-- | src/seat.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -394,13 +394,15 @@ 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}; if (getuid () != 0) return; - gchar *cmd = g_strdup_printf ("initctl -q emit %s DISPLAY_MANAGER=lightdm", signal); - g_spawn_command_line_async (cmd, NULL); /* OK if it fails, probably not installed */ - g_free (cmd); + /* 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); } static void |