only block SIGALRM and SIGWINCH, not every signal, otherwise the
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Jan 1994 04:29:10 +0000 (20:29 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Jan 1994 04:29:10 +0000 (20:29 -0800)
program has no chance to handle things like SIGHUP/SIGTERM without
repainting, and, with SIGTTOU blocked, the repainting will succeed
as well

SCCS-vsn: lib/libcurses/tstp.c 8.2

usr/src/lib/libcurses/tstp.c

index 891d1d4..25eb103 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)tstp.c     8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)tstp.c     8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <curses.h>
 #endif /* not lint */
 
 #include <curses.h>
@@ -32,11 +32,12 @@ __stop_signal_handler(signo)
                return;
 
        /*
                return;
 
        /*
-        * Block every signal we can get our hands on.  This is because
-        * applications have timers going off that want to repaint the
-        * screen.
+        * Block window change and timer signals.  The latter is because
+        * applications use timers to decide when to repaint the screen.
         */
         */
-       (void)sigfillset(&set);
+       (void)sigemptyset(&set);
+       (void)sigaddset(&set, SIGALRM);
+       (void)sigaddset(&set, SIGWINCH);
        (void)sigprocmask(SIG_BLOCK, &set, &oset);
        
        /*
        (void)sigprocmask(SIG_BLOCK, &set, &oset);
        
        /*