summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBrian Bloniarz <phunge0@hotmail.com>2010-05-19 15:22:17 -0400
committerRay Strode <rstrode@redhat.com>2010-05-19 22:23:50 -0400
commit3aa2c2c687d87de58c17ae4179361f8822f3220f (patch)
treeca6136026ad182dbeba455bbc8b3a20c458defb5 /common
parent339074b5f872a90c4d7e543a359e1092a9303aab (diff)
downloadgdm-3aa2c2c687d87de58c17ae4179361f8822f3220f.tar.gz
Enable FD_CLOEXEC for signal self-pipe. Fix bug #617661.
Diffstat (limited to 'common')
-rw-r--r--common/gdm-signal-handler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/gdm-signal-handler.c b/common/gdm-signal-handler.c
index 6b7b6159..d389771a 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);