aboutsummaryrefslogtreecommitdiff
path: root/ex.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-03-03 17:52:13 +0000
committerOmar Polo <op@omarpolo.com>2021-03-03 17:52:13 +0000
commit1fbac5ba7c6c04d59d1c1199cd9f57638967a504 (patch)
treeca2e05fec9eb2a70aef2edcc74b0747674f39272 /ex.c
parentdbe262a45d6df9aa04357580a653e30fd0019a14 (diff)
handle SIGHUP gracefully
i.e. don't print scary messages with LOG_CRIT priority!
Diffstat (limited to 'ex.c')
-rw-r--r--ex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ex.c b/ex.c
index 5ff7515..47eed0b 100644
--- a/ex.c
+++ b/ex.c
@@ -416,8 +416,13 @@ handle_fork_req(int fd, short ev, void *data)
|| !recv_string(fd, &chash)
|| !recv_time(fd, &notbefore)
|| !recv_time(fd, &notafter)
- || !recv_vhost(fd, &vhost))
- fatal("failure in handling fork request");
+ || !recv_vhost(fd, &vhost)) {
+ if (errno == EINTR) {
+ event_loopbreak();
+ return;
+ }
+ fatal("failure in handling fork request: %s", strerror(errno));
+ }
d = launch_cgi(&iri, spath, relpath, addr, ruser, cissuer, chash,
notbefore, notafter, vhost);