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

Re: serial console



2009/3/14 Andrey Borzenkov <arvidjaar@xxxxxxxxx>:
> On 14 ÐÐÑÑÐ 2009 22:15:12 Maciej Kazulak wrote:
>> 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 *?
>
>> 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\x1
>>6\x00\x00\x00"}) = 0
>
> Yes, CLOCAL is cleared. What happens if you add -L to agetty parameters?
>

Oh, that does it:

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=0xcbf, 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=0xcbf, 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=0xcbf, 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)     = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0

And it finally works. Thanks.



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