hang on exit bug under Linux
mouring at etoh.eviladmin.org
mouring at etoh.eviladmin.org
Wed Dec 12 12:42:30 EST 2001
On Tue, 11 Dec 2001, Michael wrote:
> > > If you run openssh, like the following:
> > >
> > > ssh remotehost "foreverSleep &"
> > >
> > > Should and does hang (fsecure hangs as well).
> > >
> > > HOWEVER,
> > >
> > > ssh remotehost
> > > # foreverSleep &
> > > # exit
> > >
> > > DOES hang. (fsecure does not hang) This is where the bug is. If you run ssh with a tty and in interactive mode, if the client decides to disconnect, it disconnects cleanly (I'm not sure about what happens to the remaining processes, you will have to
> look at rsh code for that -- it may be SIGHUP or something, i dunno -- other posts may be clearer on this).
> >
>
> A real example would be a perl program that runs as a daemon
> #!/usr/bin/perl
> unless ($pid = fork) {
> unless (fork) {
> open(SDOUT,'>/dev/null');
> open(STDERR,'>/dev/null');
Perl opens STDIN also. So it should hang very nicely.
- Ben
More information about the openssh-unix-dev
mailing list