CSS/Harvard 2.9BSD bug report #6

Keith Bostic keith at seismo.CSS.GOV
Wed Sep 18 15:34:31 AEST 1985


Subject: libcurses has some missing signal calls
Index:	usr.lib/libcurses/tstp.c 2.9BSD

Description:
	Libcurses compiles fine, but includes some illegal system calls.
Repeat-By:
	Load libcurses with a program that includes the routine tstp().
Fix:
	Comment out the offending calls.  Honest.
	Diff follows.

*** tstp.c.right	Mon Aug 26 00:18:33 1985
--- tstp.c.wrong	Fri Jun  7 11:17:28 1985
***************
*** 32,38
  	endwin();
  	fflush(stdout);
  	/* reset signal handler so kill below stops us */
  	signal(SIGTSTP, SIG_DFL);
  #define	mask(s)	(1 << ((s)-1))
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));

--- 32,37 -----
  	endwin();
  	fflush(stdout);
  	/* reset signal handler so kill below stops us */
+ #ifndef pdp11
  	signal(SIGTSTP, SIG_DFL);
  #define	mask(s)	(1 << ((s)-1))
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
***************
*** 36,42
  	signal(SIGTSTP, SIG_DFL);
  #define	mask(s)	(1 << ((s)-1))
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  	kill(0, SIGTSTP);
  #ifndef pdp11
  	sigblock(mask(SIGTSTP));

--- 35,40 -----
  	signal(SIGTSTP, SIG_DFL);
  #define	mask(s)	(1 << ((s)-1))
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
+ #endif !pdp11
  	kill(0, SIGTSTP);
  	sigblock(mask(SIGTSTP));
  	signal(SIGTSTP, tstp);
***************
*** 38,44
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  #endif !pdp11
  	kill(0, SIGTSTP);
  	sigblock(mask(SIGTSTP));
  #endif pdp11
  	signal(SIGTSTP, tstp);

--- 36,41 -----
  #define	mask(s)	(1 << ((s)-1))
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  	kill(0, SIGTSTP);
+ #ifndef pdp11
  	sigblock(mask(SIGTSTP));
  	signal(SIGTSTP, tstp);
  	_tty = tty;
***************
*** 40,46
  	kill(0, SIGTSTP);
  #ifndef pdp11
  	sigblock(mask(SIGTSTP));
  	signal(SIGTSTP, tstp);
  	_tty = tty;
  	stty(_tty_ch, &_tty);

--- 37,42 -----
  	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  	kill(0, SIGTSTP);
  	sigblock(mask(SIGTSTP));
+ #endif pdp11
  	signal(SIGTSTP, tstp);
  	_tty = tty;
  	stty(_tty_ch, &_tty);



More information about the Comp.bugs.2bsd mailing list