From: Sebastian Harl Date: Thu, 10 Apr 2014 20:16:26 +0000 (+0200) Subject: sysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted). X-Git-Tag: sysdb-0.1.0~132^2 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=42081865aa2136a549140b8b836689fb4ac12153 sysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted). --- diff --git a/src/tools/sysdbd/main.c b/src/tools/sysdbd/main.c index ca1c50d..9828bf0 100644 --- a/src/tools/sysdbd/main.c +++ b/src/tools/sysdbd/main.c @@ -262,6 +262,10 @@ main(int argc, char **argv) sdb_plugin_init_all(); plugin_main_loop.default_interval = SECS_TO_SDB_TIME(60); + /* ignore, we see this, for example, if a client disconnects without + * closing the connection cleanly */ + signal(SIGPIPE, SIG_IGN); + memset(&backend_thread, 0, sizeof(backend_thread)); if (pthread_create(&backend_thread, /* attr = */ NULL, backend_handler, /* arg = */ NULL)) {