Skip to content

Commit

Permalink
FVWMMFL: ignore SIGPIPE
Browse files Browse the repository at this point in the history
When dealing with clients disconnecting, it's possible FvwmMFL could
receive a SIGPIPE event.  In such instances, FvwmMFL should ignore this.
  • Loading branch information
ThomasAdam committed Nov 14, 2021
1 parent 7370868 commit 1768cd9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/FvwmMFL/FvwmMFL.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,20 +248,19 @@ HandleTerminate(int fd, short what, void *arg)
static void
setup_signal_handlers(struct event_base *base)
{
struct event *hup, *term, *intrp, *quit, *pipe, *child;
struct event *hup, *term, *intrp, *quit, *child;

signal(SIGPIPE, SIG_IGN);

hup = evsignal_new(base, SIGHUP, HandleTerminate, NULL);
term = evsignal_new(base, SIGTERM, HandleTerminate, NULL);
quit = evsignal_new(base, SIGQUIT, HandleTerminate, NULL);
pipe = evsignal_new(base, SIGPIPE, HandleTerminate, NULL);
child = evsignal_new(base, SIGCHLD, HandleTerminate, NULL);
intrp = evsignal_new(base, SIGINT, HandleTerminate, NULL);

evsignal_add(hup, NULL);
evsignal_add(term, NULL);
evsignal_add(quit, NULL);
evsignal_add(pipe, NULL);
evsignal_add(child, NULL);
evsignal_add(intrp, NULL);
}
Expand Down

0 comments on commit 1768cd9

Please sign in to comment.