aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-09-15 15:29:44 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-09-15 15:29:44 +0200
commitb950a20afde7f8dff4b38db214120b3d1de2e10f (patch)
tree95108eff6372c8a3b1bece16e12b5d1e83a4e538
parenta6401ca78446610ffadb7b63c90937caa47d065a (diff)
Ignore the SIGPIPE
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>
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 28b452c2..5871d125 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)