Not a typewriter

Daniel R. Levy levy at ttrdc.UUCP
Sat Jun 14 09:13:45 AEST 1986


In article <542 at codas.ATT.UUCP>, mikel at codas.ATT.UUCP (Mikel Manitius) writes:
>> What does the sys_errlist message 'Not a typewriter' *really* mean??
>Errno 25 is usually generated when a program tries to execute an
>ioctl command that expects the file descriptor to be a terminal.
>(ie: you can't set the baud rate on a file).
>However I have also noticed that some aplications aren't very
>carefull when they use errno. For example, Informix may give
>you this message if it cannot open a database file because it
>does not exist!

I have had mail through a remote machine throw this error at me when it bounced
something I was trying to mail when it didn't know the next machine in the
path.  I kind of wondered what the dickens it was trying to ioctl()...

>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.
>--

Dunno 'bout system calls (though the general rule is you don't check
errno unless it's immediately after calling something which returned an error
code and for which the value of errno is documented on your system) but
isatty(3) can trigger this error (it tries to do an ioctl(fd,TCGETA,&garbage)
on the fd given and uses the return value to determine whether it
succeeded and ergo whether fd was connected to a tty).

>			Mikel Manitius @ AT&T-IS Altamonte Springs, FL
>			...{seismo!akgua|ihnp4|cbosgd}!codas!mikel.ATT.UUCP
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
						vax135}!ttrdc!levy



More information about the Comp.unix mailing list