Messages in this thread | | | Date | Sun, 25 May 2003 12:22:14 +0100 (BST) | From | Mitch@0Bits ... | Subject | Linux 2.4.21-rc3, writing to /dev/console returns ESPIPE |
| |
Hi,
With 21-rc3, syslogd (sysklogd package) stopped writing messages to /dev/console anymore. In the log files i see:
May 25 11:14:19 core syslogd: /dev/console: Illegal seek May 25 11:14:19 core syslogd 1.4.1: restart (remote reception).
And strace shows # strace echo foo >/dev/console
write(1, "foo\n", 4) = -1 ESPIPE (Illegal seek) close(1) = 0 munmap(0x40016000, 4096) = 0 write(2, "echo: ", 6echo: ) = 6 write(2, "write error", 11write error) = 11 write(2, "\n", 1) = 1 _exit(1) = ?
We all understand that /dev/console can't be seeked, but it shouldn't be so strict in enforcing this or else syslogd and friends will fail to work. Unfortunately Linux doesn't have a pwritev() to not update the file pointer.
The checkin on linux-2.4.21-rc3/drivers/char/tty_io.c
+ /* Can't seek (pwrite) on ttys. */ + if (ppos != &file->f_pos) + return -ESPIPE;
should not be there in my opinion.
Comments ? Mitch
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |