Re: EFAULT vs SEGV

Roger Espel Llima (espel@iAgora.com)
Tue, 25 Aug 1998 13:47:26 -0400


hpa wrote:
> No, it's not. EFAULT is non-POSIX: it exposes the difference between
> system calls and library functions.
>
> EFAULT is triggered by the same thing as SIGSEGV; the distinction is
> artificial.

the only thing I can think of that cares about the difference would be
programs trying to figure out if an address is acceptable, by doing a
read() or write() from /dev/null to that address, and checking for EFAULT.

I think it'd be worth offering SIGSEGV-on-EFAULT as an option, but libc
does sound like the right place for this.

speaking of off-topic libc wishes, I'd -really- love to have an
environment variable that sets line buffering, or no buffering at all,
as a default (as opposed to the default behaviour of line buffering
on ttys, and full buffering everywhere else). setting an env variable
before piping a program's output is a lot simpler and less wasteful than
using a pty.

-- 
Roger Espel Llima, espel@llaic.u-clermont1.fr                     -o)
http://www.eleves.ens.fr:8080/home/espel/index.html               /\\
                                                                 _\_v

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html