Tiny tty I/O bug in 2.2.x ?

Dmitry A. Antipov (antipov@frogger.msiu.ru)
Wed, 12 May 1999 19:27:26 +0400


Hello, we are working with Linux kernel 2.2.8 and found tiny
but very strange error - `read()' and `write()' can't detect EFAULT
error when file descriptor is associated with a tty and passed data
is NULL, i.e. `write (1, 0, 1)' and `read (0, 0, 1)' works fine and
returns 1. But if 0 and 1 are redirected to the regular file
via shell > or < commands, -1 is returned, EFAULT is detected and
errno has appropriate value.

Sorry for bad english.
Dmitry Antipov <antipov@msiu.ru>,
Sergey Zimin <zimin@msiu.ru>.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/