prototype of simple NX client with auto-resuming ssh session
Misha Koshelev
misha680 at gmail.com
Thu Apr 22 08:12:01 EST 2010
Keisial wrote:
> Misha Koshelev wrote:
>> p.s. Also right now I have functionality to spawn the server directly from the client, but somehow the signal(SIGHUP,SIG_HUP) command causes _both_ the server and client to ignore SIGHUP, even though it is called _only_ in the client. Any ideas? Thank you!
>>
> (I assume you mean SIG_IGN, not SIG_HUP)
>
> The server inherits the ignoring of SIGHUP. From signal(7)
>> A child created via fork(2) inherits a copy of its
>> parent's signal dispositions. During an
>> execve(2), the dispositions of handled signals are reset to the
>> default; the dispositions of ignored
>> signals are left unchanged.
>
> Perform signal(SIGHUP, SIG_DFL); after the fork but before the execv (or
> simply set SIGHUP to whatever you want in the server).
In other words - this does not actually happen.
In fact, I do _nothing_ to signals at all in the client, but when I spawn the server _from_ the client ssh will not disconnect even if the client dies...
Any ideas?
Maybe its not a signal issue at all.
Thank you!
Misha
More information about the openssh-unix-dev
mailing list