One last time (Re: SIGCHLD race *trivial* patch)
Nicolas Williams
Nicolas.Williams at ubsw.com
Sat Oct 27 03:36:31 EST 2001
One more time. The SIGCHLD race remains, which means that SSHv2 clients
don't always find out about the exiting of their sessions' lead
processes.
See below.
On Thu, Oct 25, 2001 at 09:21:02PM -0400, Nicolas Williams wrote:
>
> 1. my patch doesn't really fix the race -- signal blocking is needed for
> that. Sigh.
I take it that the BSD sigvec() interface is to be used?
If so, that'll require a compatibility shim for Solaris (which has a
sigvec in /usr/ucblib/libucb, but which I am not sure is useable w.
OpenSSH).
> 2. I think the normal expectation is that when there are no more open
> sessions or channels or children that sshd should exit. The opposite
> ought to be an option. IMHO
Never mind. It turns out that this should be a client side patch as the
client is told when its sessions end and it knows what channels are
open.
> 3. If sshd is to exit when (no more sessions && no more channels && no
> more children) then either you must use a select() timeout, at least
> when (no more sessions && no more channels), or sshd must use the
> signal-handler-writes-to-a-pipe-whose-read-end-is-selected-for trick,
> as described in the "SIGCHLD race condition race?" thread by Paul
> Menage.
If sshd is to inform the client of ended sessions then it must reliably
catch SIGCHLD. That requires blocking.
Nico
--
-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
More information about the openssh-unix-dev
mailing list