diff options
author | Omar Polo <op@omarpolo.com> | 2021-03-03 17:52:13 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-03-03 17:52:13 +0000 |
commit | 1fbac5ba7c6c04d59d1c1199cd9f57638967a504 (patch) | |
tree | ca2e05fec9eb2a70aef2edcc74b0747674f39272 /ex.c | |
parent | dbe262a45d6df9aa04357580a653e30fd0019a14 (diff) |
handle SIGHUP gracefully
i.e. don't print scary messages with LOG_CRIT priority!
Diffstat (limited to 'ex.c')
-rw-r--r-- | ex.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -416,8 +416,13 @@ handle_fork_req(int fd, short ev, void *data) || !recv_string(fd, &chash) || !recv_time(fd, ¬before) || !recv_time(fd, ¬after) - || !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); |