Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2003 11:13:10 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        "boyd, rounin" <boyd@insultant.net>
Cc:        current@freebsd.org
Subject:   Re: [PATCH] libc_r bug: successful close(2) sets errno to ENOTTY 
Message-ID:  <34474.1069755190@critter.freebsd.dk>
In-Reply-To: Your message of "Tue, 25 Nov 2003 11:04:30 %2B0100." <004b01c3b33b$873a67a0$b9844051@insultant.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <004b01c3b33b$873a67a0$b9844051@insultant.net>, "boyd, rounin" write
s:
>From: "Stefan Farfeleder" <stefan@fafoe.narf.at>
>> > errno is meaningful for syscalls after an error (the original
>> > message).  The fact that other functions also dink with errno is not
>> > relevant to that statement.
>> 
>> I read boyd's statement as a contradiction to Jacques' one (only after
>> syscall error vs. after library call error).
>
>some libc functions do mangle errno, but only after an error.
>
>in my terse statement the intention was to affirm that errno is
>meaningless unless an error has ocurred (a syscall being the
>simplest case, while random other libc calls may behave in
>the same way).

Errno is undefined unless the relevant manual page states otherwise.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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