Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 1996 11:35:03 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jraynard@dial.pipex.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Flaws in system() implementation?
Message-ID:  <199604250135.LAA31600@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604250135.LAA31600>