Date: Wed, 18 Jun 1997 08:48:21 -0400 (EDT) Message-Id: <199706181248.IAA04330@delorie.com> From: DJ Delorie To: eliz AT is DOT elta DOT co DOT il CC: eldredge AT ap DOT net, djgpp AT delorie DOT com In-reply-to: (message from Eli Zaretskii on Wed, 18 Jun 1997 09:17:46 +0300 (IDT)) Subject: Re: Possible misbehavior of write Precedence: bulk > 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.