Register SIGWINCH handler before TLS connect
Otherwise resizing the terminal will end catgirl until a handler is registered, e.g. while in ircConnect(): catgirl: tls_handshake: (null) Hoist registration right after uiInitEarly() as earliest possible point in main() since initscr(3) sets up various signals incl. SIGWINCH, i.e. initialise `cursesWinch' afterwards to pick up curses(3)'s handler.master
parent
2b7f62dbd4
commit
b6cedf7dba
2
chat.c
2
chat.c
|
@ -270,6 +270,7 @@ int main(int argc, char *argv[]) {
|
||||||
ircConfig(insecure, trust, cert, priv);
|
ircConfig(insecure, trust, cert, priv);
|
||||||
|
|
||||||
uiInitEarly();
|
uiInitEarly();
|
||||||
|
sig_t cursesWinch = signal(SIGWINCH, signalHandler);
|
||||||
if (save) {
|
if (save) {
|
||||||
uiLoad(save);
|
uiLoad(save);
|
||||||
atexit(exitSave);
|
atexit(exitSave);
|
||||||
|
@ -324,7 +325,6 @@ int main(int argc, char *argv[]) {
|
||||||
signal(SIGALRM, signalHandler);
|
signal(SIGALRM, signalHandler);
|
||||||
signal(SIGTERM, signalHandler);
|
signal(SIGTERM, signalHandler);
|
||||||
signal(SIGCHLD, signalHandler);
|
signal(SIGCHLD, signalHandler);
|
||||||
sig_t cursesWinch = signal(SIGWINCH, signalHandler);
|
|
||||||
|
|
||||||
fcntl(irc, F_SETFD, FD_CLOEXEC);
|
fcntl(irc, F_SETFD, FD_CLOEXEC);
|
||||||
bool pipes = !self.kiosk && !self.restricted;
|
bool pipes = !self.kiosk && !self.restricted;
|
||||||
|
|
Loading…
Reference in New Issue