Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 1997 12:49:40 +0900 (JST)
From:      Naoki Hamada <nao@sbl.cl.nec.co.jp>
To:        syssgm@devetir.qld.gov.au
Cc:        j@uriah.heep.sax.de, freebsd-hackers@FreeBSD.ORG, phk@FreeBSD.ORG
Subject:   Re: MALLOC(3) writes to stderr...
Message-ID:  <199702260349.MAA00204@sirius.sbl.cl.nec.co.jp>
In-Reply-To: Stephen McKay's message of "Wed, 26 Feb 1997 13:11:14 %2B1000 (EST)" <199702260311.NAA24882@ogre.devetir.qld.gov.au>
References:  <199702260311.NAA24882@ogre.devetir.qld.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Stephen wrote:
>Although not enforced by the kernel, file descriptors 0, 1 and 2 have a
>conventional use that should always be respected.  If you don't want to
>see stderr output, open /dev/null as descriptor 2.

Thanks. I'm going to fix the daemon in this way.

Also MALLOC(3) should be changed to keep silent unless explicitly
indicated, souldn't it?

>Some others responded that stderr and descriptor 2 are logically different
>and recommend using fileno(stderr) instead of 2.  We of the old school all
>know that stdio is an upstart young library, and will never be allowed to
>use anything but descriptor 2 on Unix. :-)

Absolutely.

- nao



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