hang on exit bug under Linux

Dan Kaminsky dan at doxpara.com
Tue Dec 11 05:50:06 EST 2001


> That is not a proper daemon program and therefore not a good example
> of a problem.  Proper daemons should always close any tty file
> descriptor, detach from any controlling terminals, call setsid() to
> form a new process group, etc.  This is more representative of a
> program that could loose data.

So I've got all these Windows 9x machines that won't shut down.  Have to
power cycle them every time, or leave them on 24/7.  Rather wasteful of
power, and you risk your file system every time you decide to go through
with it.  It's one of the worst parts of 9x.

Look: ssh user at host "command" needs to never, ever hang.  It needs to not
leave processes running, it needs to not break scripts, it needs to simply
be "this command, as if it was run locally, only it's really somewhere else.
And if I'd be staring at a prompt somewhere else, damnit, I need to be
staring at a prompt here."

I've gotten critical pages at three in the morning from irate sysadmins half
the world over wondering why I'm taking up most of the load on their machine
as a side effect of this class of bugs.  Lemme tell you, stuff like that
puts a damper on my ability to evangelize SSH :-)

> Perhaps one of the reasons this issue has been hard to get agreement
> on is that everyone is testing with different daemons and some of
> those are ill behaved?

I think it's mostly a cross platform issue.  Ugliness always hides at the
fringes, and the exact set of behavior that signifies "this app is closed"
has the exact feel of a fringe.

Yours Truly,

    Dan Kaminsky
    DoxPara Research
    http://www.doxpara.com





More information about the openssh-unix-dev mailing list