Re: [CBLX] Pseudo-terminal will not be allocated because stdin is not a terminal.

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


Salut Samuel,

From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Subject: Re: [CBLX] Pseudo-terminal will not be allocated because stdin is not a terminal.
Date: Sun, 12 Apr 2009 11:26:03 +0200

> Au pire tu peux lancer strace -o /tmp/log emacs et regarder dans
> /tmp/log les appels système concernant les ptys.
  Au pire ! Comme tu dis ! Et bien quand ça marche :
     -----

open("/dev/ptyp0", O_RDWR)              = -1 EIO (Input/output error)
open("/dev/ptyp1", O_RDWR)              = 4
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ....}) = 0
ioctl(4, TIOCGPTN, [-1076797148])       = -1 EINVAL (Invalid argument)
fstat64(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 1), ...}) = 0
stat64("/dev/ttyp1", {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ....}) = 0
statfs("/dev/ttyp1", {f_type=0x1021994, f_bsize=4096, f_blocks=421179, f_bfree=421138, f_bavail=421138, f_files=219894, f_ffree=216422, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ....}) = 0
ioctl(4, TIOCGPTN, [-1076801464])       = -1 EINVAL (Invalid argument)
fstat64(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 1), ...}) = 0
stat64("/dev/ttyp1", {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ....}) = 0
stat64("/dev/ttyp1", {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ....}) = 0
getuid32()                              = 1001
chown32("/dev/ttyp1", 1001, 4)          = -1 EPERM (Operation not permitted)
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d6a708) = 13122
waitpid(13122, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 13122
ioctl(4, TIOCSPTLCK, [0])               = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ....}) = 0
ioctl(4, TIOCGPTN, [135647484])         = -1 EINVAL (Invalid argument)
fstat64(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 1), ...}) = 0
stat64("/dev/ttyp1", {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ....}) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0xbfd16cd8, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
access("/dev/ttyp1", R_OK|W_OK)         = 0
ioctl(4, FIONBIO, [1])                  = 0
fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGINT, NULL, {0x80a44e0, [], SA_RESTART}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {0x80a44e0, [], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT QUIT CHLD], [], 8) = 0
vfork()                                 = 13123


------


Quand ça ne marche pas :

----

open("/dev/ptyp0", O_RDWR)              = -1 EIO (Input/output error)
open("/dev/ptyp1", O_RDWR)              = -1 EIO (Input/output error)
open("/dev/ptyp2", O_RDWR)              = 3
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ....}) = 0
ioctl(3, TIOCGPTN, [135193058])         = -1 EINVAL (Invalid argument)
fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 2), ...}) = 0
stat64("/dev/ttyp2", {st_mode=S_IFCHR|0660, st_rdev=makedev(3, 2), ....}) = 0
statfs("/dev/ttyp2", {f_type=0x1021994, f_bsize=4096, f_blocks=79380, f_bfree=79363, f_bavail=79363, f_files=79380, f_ffree=76551, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ....}) = 0
ioctl(3, TIOCGPTN, [-1075029688])       = -1 EINVAL (Invalid argument)
fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 2), ...}) = 0
stat64("/dev/ttyp2", {st_mode=S_IFCHR|0660, st_rdev=makedev(3, 2), ....}) = 0
stat64("/dev/ttyp2", {st_mode=S_IFCHR|0660, st_rdev=makedev(3, 2), ....}) = 0
getuid32()                              = 1001
chown32("/dev/ttyp2", 1001, 0)          = -1 EPERM (Operation not permitted)
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7dec708) = 3437
--- SIGIO (I/O possible) @ 0 (0) ---
ioctl(0, FIONREAD, [0])                 = 0
sigreturn()                             = ? (mask now [CHLD])
waitpid(3437, [{WIFEXITED(s) && WEXITSTATUS(s) == 4}], 0) = 3437
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0xbfec7628, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
close(3)                                = 0
pipe([3, 4])                            = 0
pipe([5, 6])                            = 0
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGINT, NULL, {0x80a44e0, [], SA_RESTART}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {0x80a44e0, [], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT QUIT CHLD], [], 8) = 0
vfork()                                 = 3438

-----

Si toutefois j'ai bien localisé la zone du fichier de log où se
situe le problème. De fait, dans un cas il lance access sur le
file id correspondant au pty qu'il a ouvert et dans l'autre cas
il le ferme brutalement et s'en va manifestement voir du côté
des pipes si quelque chose peut l'intéresser. Mais pourqoi ? Je
ne vois rien dans ce qui est avant qui puisse déterminer se
comportement que je n'hésite pas à qalifier d'intolérable (de
lapin). 

Pierre

> 
> Samuel
> 
> ---
> -- 
>    CarrefourBLinuX MailingListe 
>    Pour obtenir de l'aide, envoyez le sujet  help  à: 
>    carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
>    Archives: 
>    http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux
> 


---
--
   CarrefourBLinuX MailingListe
   Pour obtenir de l'aide, envoyez le sujet  help  à:
   carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
   Archives:
   http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/