[BusyBox] [PATCH] devfsd - last minute fix n2

Bastian Blank waldi at debian.org
Sat Nov 20 08:54:01 UTC 2004


On Sat, Nov 20, 2004 at 03:03:21AM +0100, Tito wrote:
> This is strange as the man pages don't report errno setting for fflush, fprintf and vfprintf.

No, this functions are ANSI-C and don't use errno at all. errno is
POSIX.

> The only call in msg_logger() that can change errno seems to be access().

No, the value of errno is undefined after a library call which may not
change errno.

> So if you restore or zero errno after access is called or at the end of the msg_logger your problem
> should be solved or am i missing something important here?
> 
> > msg_logger(), so that errno must be restored before bb_verror_msg() 
> > is called in order to not generate the false error message.

It is a bug itself to relay on the value of errno after something else
than the original call.


-- 
Beam me up, Scotty, there's no intelligent life down here!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/busybox/attachments/20041120/6e26364a/attachment-0002.pgp 


More information about the busybox mailing list