diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2012-03-05 11:23:32 +1100 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2012-03-05 11:23:32 +1100 |
commit | 457e99f08bba531f8452894a76306dee92fa6393 (patch) | |
tree | 4e16dc4fccfe1d7158898f613a9461677d712680 /src/process.c | |
parent | 5f146e0db50357c8cd3630834a090f1ec33b083a (diff) | |
download | lightdm-457e99f08bba531f8452894a76306dee92fa6393.tar.gz |
Stop file descriptors leaking into the session processes
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 5236ab8d..2910cd99 100644 --- a/src/process.c +++ b/src/process.c @@ -377,6 +377,8 @@ process_class_init (ProcessClass *klass) processes = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref); if (pipe (signal_pipe) != 0) g_critical ("Failed to create signal pipe"); + fcntl (signal_pipe[0], F_SETFD, FD_CLOEXEC); + fcntl (signal_pipe[1], F_SETFD, FD_CLOEXEC); g_io_add_watch (g_io_channel_unix_new (signal_pipe[0]), G_IO_IN, handle_signal, NULL); action.sa_sigaction = signal_cb; sigemptyset (&action.sa_mask); |