Code

sysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted).
authorSebastian Harl <sh@tokkee.org>
Thu, 10 Apr 2014 20:16:26 +0000 (22:16 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 10 Apr 2014 20:16:26 +0000 (22:16 +0200)
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)) {