Subject: Re: xterm tty ownership
To: Gary Duzan <gary@duzan.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 07/04/2007 12:56:25
On Jul 4, 12:23pm, gary@duzan.org (Gary Duzan) wrote:
-- Subject: Re: xterm tty ownership

|    It looks like it is to me.
| 
| ===========================================================================
|  13377      1 xterm    CALL  open(0x438d23,2,0)
|  13377      1 xterm    NAMI  "/dev/tty"
|  13377      1 xterm    RET   open 4
|  13377      1 xterm    CALL  setitimer(0,0x7f7fffffd130,0x7f7fffffd110)
|  13377      1 xterm    RET   setitimer 0
|  13377      1 xterm    CALL  __sigaction_sigtramp(SIGALRM,0x7f7fffffd130,0x7f7fffffd110,0x7f7ffbd7c31c,2)
|  13377      1 xterm    RET   __sigaction_sigtramp 0
|  13377      1 xterm    CALL  ioctl(4,TIOCGETA,0x7f7fffffe970)
|  13377      1 xterm    GIO   fd 4 read 44 bytes
|        "\^B\^C\0\0\a\0\0\0\0K\0\0\M-O\^E\0 \^D\M^?\M^?\^?\^W\^U\^R\M^?\^C\^\\
| 	\^Z\^Y\^Q\^S\^V\^O\^A\0\^T\M^?\0\M^V\0\0\0\M^V\0\0"
|  13377      1 xterm    RET   ioctl 0
|  13377      1 xterm    CALL  close(4)
|  13377      1 xterm    RET   close 0
|  13377      1 xterm    CALL  open(0x7f7ffc00ec24,2,0x54e000)
|  13377      1 xterm    NAMI  "/dev/ptm"
|  13377      1 xterm    RET   open 4
|  13377      1 xterm    CALL  ioctl(4,TIOCPTMGET,0x7f7fffffd0a0)
|  13377      1 xterm    NAMI  "/dev/ptyp9"
|  13377      1 xterm    NAMI  "/dev/ttyp9"
|  13377      1 xterm    NAMI  "/dev/ttyp9"
|  13377      1 xterm    GIO   fd 4 read 40 bytes
|        "\^E\0\0\0\^F\0\0\0/dev/ptyp9\0\0\0\0\0\0/dev/ttyp9\0\0\0\0\0\0"
|  13377      1 xterm    RET   ioctl 0
|  13377      1 xterm    CALL  close(4)
|  13377      1 xterm    RET   close 0
| ===========================================================================
| 
|    I get the same thing on my 4.0 branch i386 box which isn't having
| the problem.


I don'g get it then. The TIOCPTMGET should be doing the chown/chgrp/chmod
for the pty, so that it ends up with the right permissions.

christos