redirecting output

Peter da Silva peter at ficc.ferranti.com
Wed Jul 4 01:36:48 AEST 1990


In article <17008 at haddock.ima.isc.com> karl at 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.
<peter at ficc.ferranti.com>: Inappropriate ioctl for device
-- 



More information about the Comp.lang.c mailing list