Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!mtuxo!mtune!akguc!akgua!gatech!seismo!mcvax!vmucnam!imag!inria!axis!philip From: philip@axis.UUCP Newsgroups: net.unix,net.unix-wizards Subject: Re: Not a typewriter Message-ID: <717@axis.UUCP> Date: Mon, 16-Jun-86 16:17:11 EDT Article-I.D.: axis.717 Posted: Mon Jun 16 16:17:11 1986 Date-Received: Fri, 20-Jun-86 01:18:09 EDT References: <1683@homxb.UUCP> <542@codas.ATT.UUCP> Reply-To: philip@axis.UUCP (Philip Peake) Organization: Axis Digital, 135 rue d'Aguesseau, Boulogne, 92100, FRANCE Lines: 30 Xref: watmath net.unix:8223 net.unix-wizards:18458 In article <542@codas.ATT.UUCP> mikel@codas.UUCP writes: >> What does the sys_errlist message 'Not a typewriter' *really* mean?? > >I think there may be one or two system calls that will alter >errno to be 25, without returning a non-zero value, when in >fact there was no error. This is true. *However*, if you look at the documentation *carefully*, you will find that it says that errno is only valid if the system call preceeding it returned an error value. I agree that this is a disgusting state of affairs, and I have recently had problems with a code segment as follows: fp = fopen(.....); errno = 0; .. .. loop: fwrite(.....); if (errno != 0) /* a write problem occured */ { ... ... } .. This bombed out complaining about "Not a teletype", there was in fact, no problem at all. The code came from a BSD4.? system, the machine on which the problems occured runs S5.2.