~ubuntu-branches/ubuntu/wily/lightdm/wily-proposed

« back to all changes in this revision

Viewing changes to src/seat.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2015-04-08 14:37:17 UTC
  • Revision ID: package-import@ubuntu.com-20150408143717-xrati8yevsglinu0
Tags: 1.14.0-0ubuntu2
Quiesce initctl errors when not running under upstart. (LP: #1414420)

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
{
395
395
    g_return_if_fail (signal != NULL);
396
396
    g_return_if_fail (signal[0] != 0);
 
397
    const gchar* argv[] = {"initctl", "-q", "emit", signal, "DISPLAY_MANAGER=lightdm", NULL};
397
398
 
398
399
    if (getuid () != 0)
399
400
        return;
400
401
 
401
 
    gchar *cmd = g_strdup_printf ("initctl -q emit %s DISPLAY_MANAGER=lightdm", signal);
402
 
    g_spawn_command_line_async (cmd, NULL); /* OK if it fails, probably not installed */
403
 
    g_free (cmd);
 
402
    /* OK if it fails, probably not installed or not running upstart */
 
403
    g_spawn_async (NULL, argv, NULL,
 
404
            G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
 
405
            NULL, NULL, NULL, NULL);
404
406
}
405
407
 
406
408
static void