From owner-cvs-lib Fri Aug 16 00:52:40 1996 Return-Path: owner-cvs-lib Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA16041 for cvs-lib-outgoing; Fri, 16 Aug 1996 00:52:40 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA15924; Fri, 16 Aug 1996 00:51:01 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id JAA28697; Fri, 16 Aug 1996 09:50:58 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id JAA15158; Fri, 16 Aug 1996 09:50:57 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id JAA05555; Fri, 16 Aug 1996 09:31:02 +0200 (MET DST) From: J Wunsch Message-Id: <199608160731.JAA05555@uriah.heep.sax.de> Subject: Re: cvs commit: src/lib/libncurses lib_newterm.c To: jkh@time.cdrom.com (Jordan K. Hubbard) Date: Fri, 16 Aug 1996 09:31:02 +0200 (MET DST) 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 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <26979.840178839@time.cdrom.com> from "Jordan K. Hubbard" at "Aug 16, 96 00:00:39 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)