BTW, the output "ps" output diff looks like this on i386:

$ diff -U0 ps1.txt ps2.txt
--- ps1.txt     2007-10-15 16:13:06.000000000 +0200
+++ ps2.txt     2007-10-15 16:13:25.000000000 +0200
@@ -130 +129,0 @@
-root     31704 31643  0 16:10 ?        00:00:00 [login] <defunct>


Alexander Kriegisch:
>> Are you able to reproduce it on i386?
> 
> Yes, if I call do this during the telnet session to my Linux VM:
> 
> $ sudo ./busybox setconsole -r
> $ sudo ./busybox setconsole
> $ exit
> logout
> (session hangs)
> 
>> Can you verify this theory by looking at ps output? These orphaned 
>> children of ash will show up as children of init (they are reparented
>> to init because their original parent died).
> 
> I compared ps output before the telnet session and after "exit" with
> hanging client, but *before* the client is closed manualle, because then
> the difference is gone again:
> 
> $ ps | grep -v ps > ps1.txt
> $ ps | grep -v ps > ps2.txt
> $ diff -U0 ps1.txt ps2.txt
> --- ps1.txt     Mon Oct 15 15:55:52 2007
> +++ ps2.txt     Mon Oct 15 15:56:19 2007
> @@ -41,0 +42 @@
> + 1855 root            Z   [sh]
> 
> the above output was generated on my embedded system again, BTW. But it
> should be the same on i386 where I can also reproduce it, see further above.
> 
>> Do you think it may be useful to add telnet switch to close 
>> connections when ash dies?
> 
> If there is no other way to fix it, yes. I would prefer telnetd being
> able to handle the situation, though. The decisive hint would be
> setconsole, as mentioned: In my shell profile on the embedded system
> there is this (shortened):
> 
> tty=${tty##*-> }
> echo "tty is \"$tty\""
> # This prints something like: tty is "/dev/pts/0"
> setconsole $tty
> 
> When I don't do setconsole or call setconsole -r again before exiting,
> the problem does not occur.
> 
> Regards
> --
> Alexander Kriegisch
> 
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to