[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: putty logout hang



On Mon, Dec 16, 2002 at 02:53:47PM -0800, Charlie Reiman wrote:
> > -----Original Message-----
> > From: Brooks R. Robinson [mailto:brooks.robinson@rides.com]
> > Sent: Monday, December 16, 2002 2:39 PM
> > To: debian
> > Subject: RE: putty logout hang
> >
> >
> > | Hi,
> > | Whenever I login to my woody server and run a command
> > | and place it in the background, I can't logout from the putty
> > | window properly.
> > | For example:
> > | I'll use putty (ssh), login and run an rsync command over the network.
> > | (This command may take 10 minutes)
> > | So I ^Z it, and then bg it to the background.
> > | I then use the exit command and I logout but the putty window hangs.
...

> I believe this behavior is intentional.

It is.

> the reason but I'll take a wild guess and say that as long as the child
> process is attached to a tty, ssh won't let go of the parent. I suspect if

That's true.

> Something like this might work (bash, sh)
> 
> ls < /dev/null >/dev/null 2>&1

It does.  If you want to run something in the background and log out
of your ssh session, you have to make sure to redirect stdin, stdout
and stderr (or your application could close them), because ssh(d?)
will wait there as long as input could be required or output could
arrive for you to see.

It's doing you a favor.

This is new in Woody; Potato's (ancient) openssh packages, which only
did protocol 1, didn't wait.

--Pete



Reply to: