[gdm] Enable FD_CLOEXEC for signal self-pipe. Fix bug #617661.



commit 3aa2c2c687d87de58c17ae4179361f8822f3220f
Author: Brian Bloniarz <phunge0 hotmail com>
Date:   Wed May 19 15:22:17 2010 -0400

    Enable FD_CLOEXEC for signal self-pipe. Fix bug #617661.

 common/gdm-signal-handler.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/common/gdm-signal-handler.c b/common/gdm-signal-handler.c
index 6b7b615..d389771 100644
--- a/common/gdm-signal-handler.c
+++ b/common/gdm-signal-handler.c
@@ -488,6 +488,8 @@ gdm_signal_handler_init (GdmSignalHandler *handler)
         if (pipe (signal_pipes) == -1) {
                 g_error ("Could not create pipe() for signal handling");
         }
+        fcntl(signal_pipes[0], F_SETFD, FD_CLOEXEC);
+        fcntl(signal_pipes[1], F_SETFD, FD_CLOEXEC);
 
         ioc = g_io_channel_unix_new (signal_pipes[0]);
         g_io_channel_set_flags (ioc, G_IO_FLAG_NONBLOCK, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]