home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.sgi:18324 comp.sys.sgi.bugs:42 comp.unix.ultrix:9072
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!gatech!swrinde!sdd.hp.com!network.ucsd.edu!news.service.uci.edu!draco.acs.uci.edu!iglesias
- From: iglesias@draco.acs.uci.edu (Mike Iglesias)
- Subject: Re: tempnam(3S) bug, possibly on all MIPS
- Nntp-Posting-Host: draco.acs.uci.edu
- Message-ID: <2B394E9C.23063@news.service.uci.edu>
- Newsgroups: comp.sys.sgi,comp.sys.sgi.bugs,comp.unix.ultrix
- Organization: University of California, Irvine
- Lines: 33
- Date: 24 Dec 92 05:46:04 GMT
- References: <1gu849INNp6k@menudo.uh.edu> <tqcnepk@zuni.esd.sgi.com> <1992Dec24.011451.497@pixar.com>
-
- In article <1992Dec24.011451.497@pixar.com> aaa@pixar.com (Tony Apodaca) writes:
- >In an article, murphy@ufp.dco.dec.com (Rick Murphy) writes:
- >>Looking at errno after calling a library routine that hasn't failed isn't
- >>a useful thing to do. The call succeeded - you've got no reason to go looking
- >>at errno.
- >
- > This is not really the point. The point is that a smart programmer
- >checks errno after every system call.
-
- Yes, it is the point. Here's an excerpt from the Ultrix errno(2) man
- page:
-
- The errno external variable is set when an error occurs in a system
- call. You can use the value stored in errno to obtain a more detailed
- description of the error than is given in the system call's return
- value. The errno variable is not cleared on successful system calls, so
- you should check its value only when an error is reported.
-
- The Sun intro(2) man page says essentially the same thing.
-
- >errno had
- >been set as a side-effect of tmpnam() in a different module in a different
- >file hundreds of lines of code ago. This is totally unexpected (and
- >I might add totally undocumented) behavior, and it is a pain in the butt.
-
- It is documented, as noted above.
-
-
- Mike Iglesias Internet: iglesias@draco.acs.uci.edu
- University of California, Irvine BITNET: iglesias@uci
- Office of Academic Computing uucp: ...!ucbvax!ucivax!iglesias
- Distributed Computing Support phone: (714) 856-6926
-
-