Re: bug in write(2) system call.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 17 Oct 1998 14:57:56 +0100 (BST)


> As a continuation of the thread "bug in read(2) syscall" on
> linux-smp I would like to confirm that the same bug exists in
> write(2) as well, i.e. write(1, 0, 10) returns 10 instead of -1
> with errno=EFAULT.
>
> This is only when the descriptor is a tty - on files and /dev/null
> it's okay...

Its also not actually a bug. What happens when you pass invalid pointers is
undefined by posix. Obviously the Linux idea of undefined doesnt include
crashes but returning an OK is fine

-
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/