[accounts-dialog] Ignore SIGPIPE
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Ignore SIGPIPE
- Date: Thu, 4 Feb 2010 20:55:06 +0000 (UTC)
commit c4567db7f1c01345aec20b2aa806c001cb0f543a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 4 15:26:05 2010 -0500
Ignore SIGPIPE
The worlds most useless signal was causing the child_watch handler
to not see passwd exit, since it was killed by a signal.
src/run-passwd.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/run-passwd.c b/src/run-passwd.c
index a467303..5afabd9 100644
--- a/src/run-passwd.c
+++ b/src/run-passwd.c
@@ -128,6 +128,12 @@ child_watch_cb (GPid pid, gint status, PasswdHandler *passwd_handler)
free_passwd_resources (passwd_handler);
}
+static void
+ignore_sigpipe (gpointer data)
+{
+ signal (SIGPIPE, SIG_IGN);
+}
+
/* Spawn passwd backend
* Returns: TRUE on success, FALSE otherwise and sets error appropriately */
static gboolean
@@ -153,7 +159,7 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error)
argv, /* Argument vector */
envp, /* Environment */
G_SPAWN_DO_NOT_REAP_CHILD, /* Flags */
- NULL, /* Child setup */
+ ignore_sigpipe, /* Child setup */
NULL, /* Data to child setup */
&passwd_handler->backend_pid, /* PID */
&my_stdin, /* Stdin */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]