Article delegate-en/3389 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3388@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Detaching from terminal not good, SSH session hangs on logout
12 Jul 2006 11:34:25 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hallo,

In message <_A3388@delegate-en.ML_> on 07/12/06(20:03:04) I wrote:
 | |The most important trick is to fork() twice, so the process becomes its 
 | |own process group and is detached from any terminal and process group.
 |
 |I think it is the very functionarity of setsid() and it works as expected
 |on BSD.  I tested to close the standard input after setsid() as the
 |enclosed patch, and it solved the problem of SSH on Linuxes I have
 |(Debian3.1 and RedHat9).

I tested fork() after setsid() but it does not solved the problem.
It might not be the problem of daemonizing but it seems just because
sshd (left as "sshd: user@notty") does not finish until the pty is
closed completely, possibly for security consideration (?)
Or it might be just a bug of ssh:
<URL:http://lists.debian.org/debian-ssh/2005/02/msg00012.html>
> Summary:
> Lot of command-only sshd childs hangs witch kernel 2.6
>
> Description:
> on Debian Linux ( sarge ) with kernel 2.6.9 hangs a non privileged
> thread from sshd if esecuted command returns. Not every request hangs,
> but a lot:

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V