Date: Thu, 20 Apr 1995 11:18:32 -0400 From: Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu> To: rw@namu01.gwdg.de (Rainer Wittmann UMS) Cc: bugs@FreeBSD.org Subject: signal handling bug Message-ID: <9504201518.AA05095@halloran-eldar.lcs.mit.edu> In-Reply-To: <9504201250.AA26059@namu01.gwdg.de>
index | next in thread | previous in thread | raw e-mail
<<On Thu, 20 Apr 95 14:50:45 +0200, rw@namu01.gwdg.de (Rainer Wittmann UMS) said:
> Any unix system, I know, except FreeBSD 2.0, behaves as follows,
> [description deleted]
Then you've never before used a 4BSD system. This is very
long-standard BSD behavior (goes back to 1982 or earlier).
> void SIGINT_handler(void)
void SIGINT_handler(int)
> {
> signal(SIGINT, (void (*)(int))SIGINT_handler);
Obviously you're used to using System V. Delete this line.
> fprintf(stdout, "\nSIGINT received\n");
> }
> char chr;
> void main(void)
> {
> signal(SIGINT, (void (*)(int))SIGINT_handler);
struct sigaction sa;
sa.sa_handler = SIGINT_handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SIGINT, &sa, (struct sigaction *)0);
> errno = 0;
> read(0, &chr, 1);
> if( errno == EINTR ) fprintf(stdout, "errno = EINTR\n");
> }
-GAWollman
--
Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ...
wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence. We like people
MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9504201518.AA05095>
