Skip to content

Commit

Permalink
Merge pull request #49 from nirs/sigpipe
Browse files Browse the repository at this point in the history
Ignore SIGPIPE, handle EPIPE
  • Loading branch information
AkihiroSuda committed Sep 18, 2024
2 parents 3771e2b + 4fbd8de commit d992630
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ int main(int argc, char *argv[]) {
signal(SIGHUP, signalhandler);
signal(SIGINT, signalhandler);
signal(SIGTERM, signalhandler);
signal(SIGPIPE, signalhandler);

// We will receive EPIPE on the socket.
signal(SIGPIPE, SIG_IGN);

int pid_fd = -1;
if (cliopt->pidfile != NULL) {
Expand Down

0 comments on commit d992630

Please sign in to comment.