Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: serial console



2009/3/14 Andrey Borzenkov <arvidjaar@xxxxxxxxx>:
> Interesting, Mandriva RPM has patch that opens tty with O_NONBLOCK;
> presumably exactly to work around this issue. I am still not convinced
> that it is the right way; I would really like to understand what happens
> with tty driver. Could you dump full contents of struct termios *? I
> believe in Linux it should be something like
>
> strace -e verbose=ioctl ...
>

Here you go.

strace -v zsh:
fcntl(1023, F_GETFL)                    = -1 EBADF (Bad file descriptor)
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x1500,
c_oflags=0x5, c_cflags=0x4bf, c_lflags=0x83b, c_line=0,
c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"})
= 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x1500,
c_oflags=0x5, c_cflags=0x4bf, c_lflags=0x83b, c_line=0,
c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"})
= 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x1500,
c_oflags=0x5, c_cflags=0x4bf, c_lflags=0x83b, c_line=0,
c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"})
= 0
readlink("/proc/self/fd/0", "/dev/ttyS1"..., 4095) = 10
open("/dev/ttyS1", O_RDWR|O_NOCTTY



Messages sorted by: Reverse Date, Date, Thread, Author