From owner-freebsd-hackers Wed Apr 24 18:50:42 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA29066 for hackers-outgoing; Wed, 24 Apr 1996 18:50:42 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA29055 for ; Wed, 24 Apr 1996 18:50:37 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id LAA31600; Thu, 25 Apr 1996 11:35:03 +1000 Date: Thu, 25 Apr 1996 11:35:03 +1000 From: Bruce Evans Message-Id: <199604250135.LAA31600@godzilla.zeta.org.au> To: bde@zeta.org.au, jraynard@dial.pipex.com Subject: Re: Flaws in system() implementation? Cc: freebsd-hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> 5. Use of the crufty signal() and deprecated sigblock() and sigsetmask() >> instead of POSIX signal handling interfaces. It isn't clear whether the >> sa_mask and sa_flags used by signal() give the correct behaviour. >Yes, I thought about this but thought it best to try and avoid too >many changes to the original code. Good. >Actually I was thinking about a "project" that I can do on 2.1.0-R >code (I don't think I can afford the phone bills involved in running >-current) and trying to make things like signal-handling in libc more >Posix-compliant seems like a good one to start with. >Any objections and/or pitfalls if I do this? Keep up with -current enough to avoid re-doing things (unless you're just doing them for educational purposes). I just checked the NetBSD version and found that -current would already have your changes if it kept up with NetBSD :-). The NetBSD version also replaces execl() by execve(), presumably to save a few cycles. >> Some of these points also apply to popen/pclose, but the FreeBSD already >> seems to be correct although unnecessarily unportable. E.g., it handles >> EINTR. >Out of interest, why does handling EINTR make it unportable? I meant that handling EINTR helped make it correct. The old signal handling functions make it unportable. Bruce