Skip site navigation (1)Skip section navigation (2)
Date:      25 May 1998 13:49:56 +0200
From:      dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= )
To:        Ruslan Ermilov <ru@ucb.crimea.ua>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/6741: libc: printf() causes errno is set to 2
Message-ID:  <xzpogwmbme3.fsf@ringhorni.ifi.uio.no>
In-Reply-To: Ruslan Ermilov's message of "Sun, 24 May 1998 23:10:01 -0700 (PDT)"
References:  <199805250610.XAA29526@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov <ru@ucb.crimea.ua> writes:
> > In case you are curious, the errno=2 comes from malloc() checking for
> > the existance of /etc/malloc.conf.
> Why then it is not set to 2 when I use fprintf(stderr, ...) or compile
> with libc_r?

What the h* does it matter? The point is that the value of errno is
not to be relied upon *except* in the *specific* case of a system call
or library function that returns an error code which tells you that
errno was set to a meaningful value. No such guarantee is given for
the printf family. Read 'man 2 intro' if you still don't get it.

-- 
Noone else has a .sig like this one.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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