diff options
author | Kunhoon Baik <knhoon.baik@samsung.com> | 2016-10-27 09:12:07 +0900 |
---|---|---|
committer | Yunmi Ha <yunmi.ha@samsung.com> | 2016-11-03 15:01:09 +0900 |
commit | 21f31f20b2f1541f15fe06cd26fce221120dda78 (patch) | |
tree | 1a939addcffd7b0d23e008839880d279cd04d2e7 | |
parent | b76dbe8c10c63b1cf2ddbb91b2c13165da43d08b (diff) | |
download | tlm-21f31f20b2f1541f15fe06cd26fce221120dda78.tar.gz tlm-21f31f20b2f1541f15fe06cd26fce221120dda78.tar.bz2 tlm-21f31f20b2f1541f15fe06cd26fce221120dda78.zip |
Ingore SIGPIPE default behaviorsubmit/tizen_3.0_common/20161110.084657submit/tizen_3.0/20161103.060416accepted/tizen/3.0/wearable/20161103.131403accepted/tizen/3.0/tv/20161103.131349accepted/tizen/3.0/mobile/20161103.131331accepted/tizen/3.0/ivi/20161103.131426accepted/tizen/3.0/common/20161114.082020
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
-rwxr-xr-x | src/sessiond/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, |