Not a typewriter

philip at axis.UUCP philip at axis.UUCP
Tue Jun 17 06:17:11 AEST 1986


In article <542 at codas.ATT.UUCP> mikel at 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.



More information about the Comp.unix mailing list