hpa@zytor.com (H. Peter Anvin) wrote on 02.12.00 in <90cs2v$6u6$1@cesium.transmeta.com>:
> Again, that's wrong even when you replace /dev/random with something
> else. After all, you could be getting EINTR at any time, too, or get
> interrupted by a signal in the middle (in which case you'd get a short
> read.)
>
> SUCH CODE IS BROKEN. PERIOD. FULL STOP.
Well, one might argue that for some applications, it's sufficient to
detect and abort such a situation.
But not checking is *never* right. Except *maybe* for a throwaway program
whose source you erase after one use.
MfG Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:25 EST