Date: Fri, 16 Aug 1996 09:31:02 +0200 (MET DST) From: J Wunsch <j@uriah.heep.sax.de> To: jkh@time.cdrom.com (Jordan K. Hubbard) Cc: joerg_wunsch@uriah.heep.sax.de, jkh@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-lib@freefall.freebsd.org Subject: Re: cvs commit: src/lib/libncurses lib_newterm.c Message-ID: <199608160731.JAA05555@uriah.heep.sax.de> In-Reply-To: <26979.840178839@time.cdrom.com> from "Jordan K. Hubbard" at "Aug 16, 96 00:00:39 am"
next in thread | previous in thread | raw e-mail | index | archive | help
As Jordan K. Hubbard wrote: > > I don't trust you. ;-) signal()'s implementation is mainly based on > > And this coming from the guy who got us to change the 3COM driver at > the last minute in 2.1.5? :-) Hey, that's unfair competition! :) > Try it for > yourself if you don't believe me. :-) No, i don't try it, but will quote you signal(3): sigset_t _sigintr; /* shared with siginterrupt */ sig_t signal(s, a) int s; sig_t a; { struct sigaction sa, osa; sa.sa_handler = a; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (!sigismember(&_sigintr, s)) sa.sa_flags |= SA_RESTART; if (sigaction(s, &sa, &osa) < 0) return (SIG_ERR); return (osa.sa_handler); } That's about all there is to be. So now, it should be easy to compare against libncurses to see what they've got wrong. (_sigintr is initially empty, it's only affected by siginterrupt(), so you should perhaps always set SA_RESTART.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608160731.JAA05555>