Code

sysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted).
[sysdb.git] / src / tools / sysdbd / main.c
index ca1c50de3866318efefe06f399539d65a762f35d..9828bf0881bd1c6510b8c3bef22ef567ad776fa1 100644 (file)
@@ -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)) {