Path: utzoo!mnetor!uunet!seismo!sundc!netxcom!ewiles From: ewiles@netxcom.UUCP (Edwin Wiles) Newsgroups: comp.sources.bugs Subject: Re: Perl Bugs and Comments Message-ID: <688@netxcom.UUCP> Date: 29 Feb 88 13:38:08 GMT References: <69600002@sushi> <1418@devvax.JPL.NASA.GOV> Reply-To: ewiles@netxcom.UUCP (Edwin Wiles) Organization: NetExpress Communications, Inc., Vienna, VA Lines: 27 Summary: ENOTTY problem In article <1418@devvax.JPL.NASA.GOV> lwall@devvax.JPL.NASA.GOV (Larry Wall) writes: >In article <69600002@sushi> tchrist@sushi.UUCP writes: >: A) $! is always 25 (ENOTTY), regardless of what I've just done. >: The documentation says it should contain "the current value >: of errno, with all the usual caveats". I think I understand how >: things interract with errno, but I can't explain this one. > >I can't explain it either. It works fine here on both Sun and Vax. Is your >errno declared to be something other than int maybe? Is your compiler blowing >the cast to (double) in stab_str()? I've run into this problem before. (Xenix, on PC/AT) It seems that sprintf, and possibly others in the 'print' family, make a call to "isatty()". Of course, since it isn't printing to a tty (sprintf that is...) it returns false, and sets errno to 'ENOTTY'. A d*mn nussance, since it requires that we save the value of errno before doing any sprintf, if we expect to need it afterward. (Larry! I'm supprised! I thought you'd know about this one!) Later! -- ...!hadron\ "Who?... Me?... WHAT opinions?!?" | Edwin Wiles ...!sundc\ Schedule: (n.) An ever changing | NetExpress Comm., Inc. ...!pyrdc\ nightmare. | 1953 Gallows Rd. Suite 300 ...!uunet!netxcom!ewiles | Vienna, VA 22180