Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.unix,net.unix-wizards Subject: Re: Not a typewriter Message-ID: <957@ttrdc.UUCP> Date: Fri, 13-Jun-86 19:13:45 EDT Article-I.D.: ttrdc.957 Posted: Fri Jun 13 19:13:45 1986 Date-Received: Tue, 17-Jun-86 19:14:40 EDT References: <1683@homxb.UUCP> <542@codas.ATT.UUCP> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 36 Xref: watmath net.unix:8144 net.unix-wizards:18396 In article <542@codas.ATT.UUCP>, mikel@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