Processes left unkilled (portable)
markus at openbsd.org
Mon Oct 29 19:36:58 EST 2001
On Sun, Oct 28, 2001 at 09:13:50AM -0800, Danek Duvall wrote:
> On Sun, Oct 28, 2001 at 10:20:57AM +0100, Markus Friedl wrote:
> > the killing has been removed completely.
> > could you please try a recent snapshot from
> > http://www.openssh.com/portable.html
> Indeed, now both processes are orphaned. That's not the behavior I'd
> expect, honestly. I would expect that the command started on the remote
> end would be the leader of its own process group, and if it didn't want
> it and its children to die, that it would call setsid() or setpgid().
> I didn't see anything in the ChangeLog that addressed this explicitly;
> is there a reason for it?
the killing was random and very wrong.
the remote commands should die when stdin/out close.
the processes are not killed in this case, otherwise
sshd would kill COMMAND in this case:
ssh -2n localhost 'exec > /dev/null 2>&1; sleep 10; COMMAND; exit 5'; echo ?
More information about the openssh-unix-dev