From: Kunhoon Baik Date: Thu, 27 Oct 2016 00:12:07 +0000 (+0900) Subject: Ingore SIGPIPE default behavior X-Git-Tag: submit/tizen_3.0/20161103.060416^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21f31f20b2f1541f15fe06cd26fce221120dda78;p=platform%2Fcore%2Fsystem%2Ftlm.git Ingore SIGPIPE default behavior TLM session daemon uses several communication libraries like syslog, pam, and so on. Thus, basically it should handle SIGPIPE. Otherwise, the daemon will be exited unexpectedly, it will make user-session unstable. Change-Id: Idd52ba703f3e732b6ccc6c9f1a35c18a952c0f9b --- diff --git a/src/sessiond/main.c b/src/sessiond/main.c index d0e4db6..23317d9 100755 --- a/src/sessiond/main.c +++ b/src/sessiond/main.c @@ -72,6 +72,12 @@ _install_sighandlers (GMainLoop *main_loop) WARN ("failed to ignore SIGINT: %s", strerror_r(errno, strerr_buf, MAX_STRERROR_LEN)); } + if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) + { + gchar strerr_buf[MAX_STRERROR_LEN] = {0,}; + WARN ("failed to ignore SIGPIPE: %s", strerror_r(errno, strerr_buf, MAX_STRERROR_LEN)); + } + source = g_unix_signal_source_new (SIGTERM); g_source_set_callback (source, _handle_quit_signal,