Date: Sun, 24 May 1998 22:40:01 -0700 (PDT) From: Stephen McKay <syssgm@dtir.qld.gov.au> To: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/6741: libc: printf() causes errno is set to 2 Message-ID: <199805250540.WAA29363@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6741; it has been noted by GNATS. From: Stephen McKay <syssgm@dtir.qld.gov.au> To: Ruslan Ermilov <ru@ucb.crimea.ua> 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 15:40:09 +1000 On Sunday, 24th May 1998, Ruslan Ermilov wrote: >>Severity: critical >>Priority: high Come now! It can't be as bad as all that! > Using printf(), fprintf(stdout, ...) causes global > variable errno set to 2. Library routines can write garbage in errno any time they want because errno should only be checked for system calls and designated library routines and only when the call returns an error indication. There is no problem here. You just have to expect errno to change for no good reason. In case you are curious, the errno=2 comes from malloc() checking for the existance of /etc/malloc.conf. Stephen. 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?199805250540.WAA29363>