libbb: introduce bb_signals and bb_signals_recursive,
[oweals/busybox.git] / console-tools / resize.c
index b4cdf50d0bf56fa5d483b5597fc862de03277a1a..7f72b9a4659bfba5a94547688e4998fa634132ba 100644 (file)
@@ -37,10 +37,12 @@ int resize_main(int argc, char **argv)
        new = old_termios;
        new.c_cflag |= (CLOCAL | CREAD);
        new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
-       signal(SIGINT, onintr);
-       signal(SIGQUIT, onintr);
-       signal(SIGTERM, onintr);
-       signal(SIGALRM, onintr);
+       bb_signals(0
+               + (1 << SIGINT)
+               + (1 << SIGQUIT)
+               + (1 << SIGTERM)
+               + (1 << SIGALRM)
+               , onintr);
        tcsetattr(STDERR_FILENO, TCSANOW, &new);
 
        /* save_cursor_pos 7