~robert-ancell/lightdm/xorg-displayfd

« back to all changes in this revision

Viewing changes to src/process.c

  • Committer: Robert Ancell
  • Date: 2012-03-05 00:23:32 UTC
  • Revision ID: robert.ancell@canonical.com-20120305002332-eox30d8k6gb70qrc
Stop file descriptors leaking into the session processes

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
    processes = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref);
378
378
    if (pipe (signal_pipe) != 0)
379
379
        g_critical ("Failed to create signal pipe");
 
380
    fcntl (signal_pipe[0], F_SETFD, FD_CLOEXEC);
 
381
    fcntl (signal_pipe[1], F_SETFD, FD_CLOEXEC);
380
382
    g_io_add_watch (g_io_channel_unix_new (signal_pipe[0]), G_IO_IN, handle_signal, NULL);
381
383
    action.sa_sigaction = signal_cb;
382
384
    sigemptyset (&action.sa_mask);