Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!rti-sel!dg_rtp!meissner From: meissner@dg_rtp.UUCP (Michael Meissner) Newsgroups: net.unix,net.unix-wizards Subject: Re: Not a typewriter Message-ID: <403@dg_rtp.UUCP> Date: Mon, 16-Jun-86 11:25:49 EDT Article-I.D.: dg_rtp.403 Posted: Mon Jun 16 11:25:49 1986 Date-Received: Wed, 18-Jun-86 04:52:57 EDT References: <1683@homxb.UUCP> <542@codas.ATT.UUCP> Reply-To: meissner@dg_rtp.UUCP (Michael Meissner) Distribution: net Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 23 Xref: watmath net.unix:8194 net.unix-wizards:18431 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! This particular error code tends to be set in errno, the first time you use a stdio file that is not a terminal. That is because the runtime library wants to know if the file is associated with a terminal (so that it can be unbuffered output in BSD or line buffered in SV.2). Hence the library does a isatty, which does an ioctl, and which fails, giving the error. If an error occurs on ioctl, isatty returns 0 instead of 1, and the library sets up to fully buffer the file. Michael Meissner Data General Corporation ...{ decvax, ihnp4, ucbvax }!mcnc!rti-sel!dg_rtp!meissner