Mail Archives: djgpp/1997/06/18/08:48:26
> I don't have POSIX handy (ANSI doesn't know about EFAULS or SIGSEGV,
> and `write' is non-ANSI anyway, so ANSI is irrelevant), therefore I
> don't know what's POSIX policy on these. DJ?
POSIX is pretty vague about EFAULT because, as it claims, "not all
systems can reliably detect it."
Here are some relevent sections:
2.4 Error Numbers
[EFAULT] Bad Address
The system detected an invalid address in attempting to use an
argument of a call. The reliable detection of this error is
implementation defined; however, implementations that do
detect this condition shall use this value.
6.4.2 Write to a File
EFAULT is not mentioned. It does, however, state that if the count
is zero, write() shall return zero and have no other results.
B.2.4 Error Numbers (Informative)
Some error numbers, such as [EFAULT], are entirely implementation
defined and are noted as such in their description in 2.4.
- Raw text -