SIGCHLD race condition?

Paul Menage pmenage at ensim.com
Thu Oct 4 05:37:41 EST 2001


>Yes. But then, when should SSHD exit? Is the above condition correct?
>I.e., (child is dead && child fildes are dead)?
>
>Ultimately, the guy who suggested the pipe technique want to know which
>solution you're open to so he knows which to code.
>

Actually, we just went with putting a 10 second maximum timeout on the
select(). I did briefly start putting together the pipe solution, as
follows:

- add a new channel type, SSH_CHANNEL_WAKEUP

- add a pre-handler that adds the pipe rfd to the readfd set

- add a post-handler that drains the pipe (and ignores the data)

But it wasn't clear to me where the best place to initialise the pipe
channel was, and I've been too busy to delve deeper into the SSH code.

Paul






More information about the openssh-unix-dev mailing list