luit hangs and eats all available cpu when the process exits. I normally see this after a `luit ssh someserver`, but also `luit echo` has the same behaviour. Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/x11-utils/+bug/515679 Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560787 I'm running luit from git [3fb0af21816b9f89c4b33e7cac5aad6d90bcc6c7] (Dec 22, 2009) on Ubuntu Lucid 10.04 updated a few days ago. Will attach strace and backtrace from an ssh session.
Created attachment 33002 [details] Output of strace Trimmed 73 MB of poll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLHUP}]) from the file. From the Debian bug report (Antti-Juhani Kaijanaho): The immediate cause is that luit is not checking for POLLHUP for the pty in waitForInput. Instead it seems to be expecting a POLLIN with zero read.
Created attachment 33003 [details] backtrace from gdb
Btw, I'm aware that the ssh password is visible in clear-text in the strace file. It was changed before and after the test.
Created attachment 33004 [details] [review] check for POLLERR|POLLHUP in WaitForInput Attached patch indeed fixes this for me. It would probably make sense to do the same in waitForOutput.
Or just make the check 'if (pfd[i].revents)'...
commit b7af1cef38d1995289acd1f2c13580b378ec0fc9 Author: Julien Cristau <jcristau@debian.org> Date: Tue Feb 2 14:45:17 2010 +0100 poll: check for POLLERR|POLLHUP in WaitForInput X.Org bug#26383 <http://bugs.freedesktop.org/26383> Acked-by: Juliusz Chroboczek <jch@pps.jussieu.fr> Signed-off-by: Julien Cristau <jcristau@debian.org>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.