From owner-freebsd-bugs Mon May 25 00:15:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA09893 for freebsd-bugs-outgoing; Mon, 25 May 1998 00:15:15 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA09886 for ; Mon, 25 May 1998 00:15:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id AAA29869; Mon, 25 May 1998 00:10:00 -0700 (PDT) Date: Mon, 25 May 1998 00:10:00 -0700 (PDT) Message-Id: <199805250710.AAA29869@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Stephen McKay Subject: Re: bin/6741: libc: printf() causes errno is set to 2 Reply-To: Stephen McKay Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/6741; it has been noted by GNATS. From: Stephen McKay To: Ruslan Ermilov Cc: freebsd-gnats-submit@freebsd.org, syssgm@dtir.qld.gov.au Subject: Re: bin/6741: libc: printf() causes errno is set to 2 Date: Mon, 25 May 1998 17:07:53 +1000 On Monday, 25th May 1998, Ruslan Ermilov wrote: >On Mon, May 25, 1998 at 03:40:09PM +1000, Stephen McKay wrote: >> 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? The luck of the draw? I think you would learn a lot about the internals of libc by tracking this down yourself. I don't know the answer. But I don't need to know the answer since it is not a problem for errno to change (or not change) for no reason. Errno has meaning only when a system call has failed, or when one of a few library routines that are documented to set errno has failed. Stephen. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message