home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4817 comp.unix.shell:4821 comp.unix.misc:4274
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sdd.hp.com!swrinde!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!uknet!root44!gwc
- From: gwc@root.co.uk (Geoff Clare)
- Newsgroups: comp.unix.wizards,comp.unix.shell,comp.unix.misc
- Subject: Re: The Problem with UNIX
- Message-ID: <By10D6.1Mz@root.co.uk>
- Date: 20 Nov 92 17:53:29 GMT
- References: <1992Nov11.194557.16258@yarc.uucp> <1992Nov12.204710.5808@reed.edu> <1992Nov16.234721.3224@nic.csu.net> <1992Nov18.110609.9149@thunder.mcrcim.mcgill.edu>
- Organization: UniSoft Ltd., London, England
- Lines: 25
-
- mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
-
- >All of these are available:
-
- >%s argv[0],
- >%s ((errno>0)&&(errno<sys_nerr))?sys_errlist[errno]:"Unknown error"
- >%d getpid()
-
- Better make that:
-
- %ld (long)getpid()
-
- since getpid() returns a pid_t on modern systems, and pid_t can be
- either int or long.
-
- >Of course, this helps only when errno contains something useful. Far
- >too many things don't do this - fopen, for example, does not have
- >anything to do with errno as any part of its contract....
-
- Out of date again. POSIX requires fopen() to set errno the same as
- open() does.
-
- --
- Geoff Clare <gwc@root.co.uk> (USA antiquated mailers: ...!uunet!root.co.uk!gwc)
- UniSoft Limited, London, England. Tel: +44 71 729 3773 Fax: +44 71 729 3273
-