Bugzilla – Bug 117193
luit sometimes hangs
Last modified: 2013-01-17 11:05:52 UTC
Bug found by Michael Andres: luit sometimes hangs. Example: mfabian@rossini:~$ for i in 1 2 3 4 5 6 7 8 9 0 ; do echo $i; luit -x echo; done 1 2 [... hangs here ...]
Created attachment 50010 [details] strace of hanging 'luit -x mutt'
Created attachment 51058 [details] p_bugzilla-117193-luit-sometimes-hangs.diff Patch which seems to solve the problem for me.
If I understand it right, pty setup stuff like copyTermios(0, pty); should be called *before* forking, otherwise the program started in the child part with "execvp()" may already try to write on the pty before the setup is finished. I'm not sure about the signal-handlers. But probably it cannot hurt to do this before the for as well.
Looks fine to me.
fixed for 10.1 Alpha2.