'what' doesn't use perror to print open errors, Sys V/3.0

T. William Wells bill at twwells.uucp
Sun Apr 30 06:09:12 AEST 1989


In article <10156 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
: In article <3759 at sugar.hackercorp.com> karl at sugar.hackercorp.com (Karl Lehenbauer) writes:
: >Several years have elapsed, which should have been long enough to make all
: >the programs distributed with Unix follow the perror() conventions that
: >the manuals tell us our programs are to follow.
:
: (1) "what" uses fopen() to open the file.  perror() is inappropriate
: except when a system call reports failure.  fopen() is not a system call.

According to the manual pages for Microport V/386 3.0e, fopen returns
an error status in errno and perror is defined to work for system
calls and library functions.

I don't have the manual pages for other systems handy, but I seem to
recall similar wording for BSD and SunOS.

---
Bill                            { uunet | novavax } !twwells!bill



More information about the Comp.bugs.sys5 mailing list