diff --git a/lib/libncurses/lib_newterm.c b/lib/libncurses/lib_newterm.c index 24808e06d20d..95ef1eb79dff 100644 --- a/lib/libncurses/lib_newterm.c +++ b/lib/libncurses/lib_newterm.c @@ -137,14 +137,14 @@ char *use_it = _ncurses_copyright; act.sa_flags = 0; sigaction(SIGTSTP, &act, NULL); act.sa_handler = cleanup; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; sigaction(SIGINT, &act, NULL); sigaction(SIGTERM, &act, NULL); - signal(SIGWINCH, size_change); #if 0 sigaction(SIGSEGV, &act, NULL); #endif + act.sa_handler = size_change; + act.sa_flags = SA_RESTART; + sigaction(SIGWINCH, &act, NULL); /* this must restart read() */ if ((stdscr = newwin(lines - stolen, columns, topstolen, 0)) == NULL) return(NULL);