Subject: Re: signal(SIGSEGV, SIG_IGN) -> 100% CPU
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 06/10/1999 11:53:48
der Mouse <mouse@Rodents.Montreal.QC.CA> writes:
> But is it worth it? The only benefits I can see to changing this are
> (1) uniformity with other syscalls, and the (current) manpage, wrt
> invalid pointer arguments (EFAULT instead of a signal), and (2)
> removing a special-case syscall from libc.
My further argument was that the manual page wasn't even incorrect.
The errors section of the manual pages are, as far as I know, meant to
be read "if you get this error, it is because of this error cause," or
"if this error cause is detected, you will get this error."
I.e. the current behaviour (not even checking the pointer 8-) is a bit
odd, but not unreasonable.
Further than that, a trivial, API-compatible reimplementation might
want to detect the error and return EFAULT, so progams and programmers
using it should understand what EFAULT means.
Re-reading the manual page, i'd say that there is one problem:
The pipe() call will fail if:
The following errors may be reported:
(a la sysctl(3)).
That is probably true for many or all of the system calls.
Chris Demetriou - email@example.com - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.