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

Re: [Cooker] /bin/login from util-linux-2.11c-2mdk breaks zsh ctty hadling



Chmouel Boudjnah wrote:

> Andrej Borsenkow <arvidjaar@xxxxxxx> writes:
>
>
>>O.K., I have found why it happens. Here goes.
>>
>
> ok fixed in latest util-linux of cooker..
>
>

No, sorry. It now tries to open /dev/tty but in wrong place - in parent,
not in child.

(ttypts/2)% rpm -q util-linux
util-linux-2.11d-1mdk
1166  read(0, "b", 1)                   = 1
1166  read(0, "o", 1)                   = 1
1166  read(0, "r", 1)                   = 1
1166  read(0, "\n", 1)                  = 1
1166  execve("/bin/login", ["/bin/login", "--", "bor"], [/* 8 vars */]) = 0
...
1166  setsid()                          = -1 EPERM (Operation not permitted)
1166  open("/dev/tty3", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
       ^^^^^^^^^^^^^^^^ useless here because ...
...
1166  fork()                            = 2397
2397  setsid()                          = 2397
       ^^^^^^^^ ... Oops!
2397  rt_sigaction(SIGHUP, {SIG_DFL}, {SIG_IGN}, 8) = 0
2397  rt_sigaction(SIGINT, {SIG_DFL}, {SIG_IGN}, 8) = 0
2397  msgget(501, 0x2|02)               = 0
2397  chdir("/home/bor")                = 0
2397  execve("/bin/zsh", ["-zsh"], [/* 6 vars */]) = 0


The same applies - setsid() in child resets ctty.

-andrej




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