Trojan Horses

Boyd Roberts boyd at necisa.ho.necisa.oz
Mon Nov 5 12:17:38 AEST 1990


In article <8645:Oct2521:49:5790 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>... Tell me: Why should I handle EDQUOT? Why should I interpret it
>as some sort of error? Who benefits if I thrash about upon this error?
>

It is an error because close() returned -1.  I don't care what errno
is set to.  The close() still failed.  What do you believe?  errno,
or the system call returning -1?  I believe the system call.  If I don't
understand errno I use a perror(3) equivalent to complain about it.

You seem to say that you know better than the system call.  How can you?
Maybe the system call is broken?  Maybe your code is broken?  Maybe the
universe is broken?  But you _have_ to believe the system call return.
You have no other logical choice.

>
>Not at all. This might be true for calls that give me information, but
>close() is not such a call. Do you check the return value of assert()?
>

I _know_ the return value of the assert.  All is ok when my assert returns.
My code, or the condition in the assert is broken.  And, no I haven't
been stupid enough to defeat assert and have it return on failure.

Sure, the assert implementation could be broken (hell, some bunch of
fools even broke cat(1)!).  Initially I'll believe that I'm wrong and
that assert is right.  Once I'm convinced otherwise it's time to fill
out the bug report, _AND NOT ONE SECOND BEFORE_!!

Dan, I reckon you just post for the sake of it.  You like playing Devil's Bozo.


Boyd Roberts			boyd at necisa.ho.necisa.oz.au

``When the going gets wierd, the weird turn pro...''



More information about the Comp.unix.internals mailing list