Ignore the SIGPIPE
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 15 Sep 2016 13:29:44 +0000 (15:29 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 15 Sep 2016 13:29:44 +0000 (15:29 +0200)
The default action is to stop the daemon.
This is not the intended behaviour because the
sriting errors are checked and EPIPE is treated.

Change-Id: I9132b683e443825e4c056301a89bfad752a99e0c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/main.c

index 28b452c..5871d12 100644 (file)
@@ -678,6 +678,9 @@ int main(int argc, char *argv[])  {
       INFO("entering foreground mode");
   }
 
+  /* ignore any SIGPIPE */
+  signal(SIGPIPE, SIG_IGN);
+
    /* start the HTTP server */
    hsrv = start_http_server(config);
    if (hsrv == NULL)