diff options
author | June McEnroe <june@causal.agency> | 2018-12-04 15:56:10 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-12-04 15:56:10 -0500 |
commit | 638be4e7757a7e7fcb52332461b5b1b5330a6771 (patch) | |
tree | 14190aec10060e1d8b9a3af6bc95b56781590cda /event.c | |
parent | Send only SIGHUP in sandman (diff) | |
download | catgirl-638be4e7757a7e7fcb52332461b5b1b5330a6771.tar.gz catgirl-638be4e7757a7e7fcb52332461b5b1b5330a6771.zip |
Show error if disconnected unintentionally
Diffstat (limited to '')
-rw-r--r-- | event.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/event.c b/event.c index 4ea9f81..a5a49cc 100644 --- a/event.c +++ b/event.c @@ -131,10 +131,14 @@ noreturn void eventLoop(void) { for (;;) { if (sig[SIGCHLD]) childWait(); - if (sig[SIGHUP]) ircFmt("QUIT :zzz\r\n"); + if (sig[SIGHUP]) { + ircFmt("QUIT :zzz\r\n"); + self.quit = true; + } if (sig[SIGINT]) { signal(SIGINT, SIG_DFL); ircFmt("QUIT :Goodbye\r\n"); + self.quit = true; } if (sig[SIGWINCH]) { curses.sa_handler(SIGWINCH); |