Date: Sat, 8 May 1999 10:00:37 +0930 From: Greg Lehey <grog@lemis.com> To: Ludo Koren <ludo_koren@tempest.sk> Cc: freebsd-hackers@FreeBSD.ORG Subject: ncurses problems (was: no subject) Message-ID: <19990508100037.F50800@freebie.lemis.com> In-Reply-To: <199905071646.SAA32811@t15.tempest.sk>; from Ludo Koren on Fri, May 07, 1999 at 06:46:13PM %2B0200 References: <199905071646.SAA32811@t15.tempest.sk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, 7 May 1999 at 18:46:13 +0200, Ludo Koren wrote: > > Hi. > > I am running 3.1-STABLE and developing a program which uses > ncurses. After localization of the problem, I minimized it to the > following: > > #include <stdio.h> > #include <ncurses.h> > #include <signal.h> > > > int main() > { > struct sigaction act; > > act.sa_handler = SIG_IGN; > act.sa_flags = 0; > sigemptyset(&act.sa_mask); > sigaction(SIGINT,&act,0); > > sigaction(SIGINT,0,&act); > printf("%d\n", act.sa_handler == SIG_IGN); > > initscr(); > > sigaction(SIGINT,0,&act); > printf("%d\n", act.sa_handler == SIG_IGN); > > return 0; > } You've missed out an important part: which library are you using? This is what I get: $ cc -g -Wall bar.c -o bar -lcurses $ ./bar 1 1 $ cc -g -Wall bar.c -o bar -lncurses $ ./bar 1 0 > Could somebody point, why the first output is 1 and the second is 0? > Is it bug or feature. It looks like ncurses is setting its own SIGINT handler. I suppose you could think of this as a feature. Does it worry you? Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990508100037.F50800>