Path: utzoo!attcan!uunet!lll-winken!sun-barr!newstop!texsun!texbell!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: redirecting output Message-ID: <9XE4PQB@xds13.ferranti.com> Date: 3 Jul 90 15:36:48 GMT References: <22931@dartvax.Dartmouth.EDU> <1990Jun29.172429.2818@zoo.toronto.edu> <17008@haddock.ima.isc.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 21 In article <17008@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: > Technically, there is. OK, but it's not a *good* excuse. > The polite action is to set errno iff an error > occurs, but most non-syscall functions are not guaranteed to be polite. In > particular, many implementations of fopen() can fail without setting errno (by > running out of buffers); Didn't know about that... > conversely, an internal call to isatty() may have set > errno when no error has really occurred. I knew about this one, but it's not relevant to the problem at hand. It does mean you can't use perror to tell if an error occurred... just what it was. -- Peter da Silva. `-_-' +1 713 274 5180. : Inappropriate ioctl for device --