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

zsh hangs with the message "zsh: can't set tty pgrp: not owner".



zsh-3.1.5-pws-24 hangs with the message "zsh: can't set tty pgrp: not
owner" when it is started by Bourne shell.

Last login: Sun Jun 27 15:20:06 from localhost
Sun Microsystems Inc.   SunOS 5.7       Generic October 1998
$ /app/zsh-3.1.5-pws-24/bin/zsh
zsh: can't set tty pgrp: not owner
^C^C^C

# akr_sh is a test user.

truss reports as following.

stat64("/dev/pts/36", 0xFFBEFAE0)               = 0
open("/dev/pts/36", O_RDWR|O_NOCTTY)            = 3
fcntl(3, F_DUPFD, 0x0000000A)                   = 10
close(3)                                        = 0
ioctl(10, TCGETS, 0x00089F78)                   = 0
getpid()                                        = 25149 [25148]
ioctl(10, TIOCGSID, 0xFFBEFC4C)                 = 0
getsid(0)                                       = 25101
ioctl(10, TIOCSPGRP, 0xFFBEFCF8)                Err#1 EPERM
kill(25149, SIG#0)                              = 0
zsh: can't set tty pgrp: not owner
write(2, " z s h :   c a n ' t   s".., 35)      = 35
setpgid(0, 0)                                   = 0
getpgrp()                                       = 25149
ioctl(10, TIOCGSID, 0xFFBEFC44)                 = 0
getsid(0)                                       = 25101
ioctl(10, TIOCGPGRP, 0xFFBEFCAC)                = 0
alarm(0)                                        = 0
sigaction(SIGALRM, 0xFFBEFC30, 0xFFBEFCE0)      = 0
sigfillset(0xFF1B8998)                          = 0
sigprocmask(SIG_BLOCK, 0xFFBEFCD0, 0xFFBEFCC0)  = 0
alarm(1)                                        = 0
sigsuspend(0xFFBEFCB0)          (sleeping...)

# Hm. Why is TIOCSPGRP failed?

truss also reports that zsh hangs with following loop.

    Received signal #14, SIGALRM, in sigsuspend() [caught]
sigsuspend(0xFFBEFCB0)                          Err#4 EINTR
setcontext(0xFFBEF998)
alarm(0)                                        = 0
sigprocmask(SIG_UNBLOCK, 0xFFBEFCD0, 0x00000000) = 0
sigaction(SIGALRM, 0xFFBEFC30, 0x00000000)      = 0
getpgrp()                                       = 25149
ioctl(10, TIOCGSID, 0xFFBEFC44)                 = 0
getsid(0)                                       = 25101
ioctl(10, TIOCGPGRP, 0xFFBEFCAC)                = 0
kill(-25149, SIGTTIN)                           = 0
    Received signal #26, SIGTTIN [ignored]
      siginfo: SIGTTIN pid=25149 uid=30000
getpgrp()                                       = 25149
ioctl(10, TIOCGSID, 0xFFBEFC44)                 = 0
getsid(0)                                       = 25101
ioctl(10, TIOCGPGRP, 0xFFBEFCAC)                = 0
alarm(0)                                        = 0
sigaction(SIGALRM, 0xFFBEFC30, 0xFFBEFCE0)      = 0
sigprocmask(SIG_BLOCK, 0xFFBEFCD0, 0xFFBEFCC0)  = 0
alarm(1)                                        = 0
sigsuspend(0xFFBEFCB0)          (sleeping...)

zsh-3.1.5-pws-23 has no problem on same situation.
-- 
Tanaka Akira



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