sleep 20&exit hangs on Linux

Wojtek Pilorz wpilorz at bdk.pl
Thu Jan 11 19:49:31 EST 2001


Dear All,

Let me quote a few lines from TODO file (SNAP-20010109):

- Linux hangs for 20 seconds when you do "sleep 20&exit".  All current
  solutions break scp or leaves processes hanging around after the ssh
  connection has ended.  It seems to be linked to two things.  One
  select() under Linux is not as nice as others, and two the children
  of the shell are not killed on exiting the shell.

When I connect to sshd (SNAP-20010109), there is indeed a hang.

However, I have verified that when I connect to sshd (openssh-1.2.3
version) there is no problem here (the client is always SNAP-20010109,
the destination machine runs both versions of sshd ).
So, does openssh 1.2.3 has problems with scp or some other problems ?

Could someone please let me know how to reliably test whether scp is OK ?

( I can transfer 160000k of nulls and all are delivered using both sshd
versions).

I find it quite useful to be able to put a program into background on a 
remote machine and exit immediately.

It might be intersting that one can use nohup as a workaround:

(nohup sleep 10 &); exit

exist ssh immediately ( and sleep is run in background on the destination
machine)

Neither

nohup sleep 10 & exit

nor

(sleep 10 &); exit

will avoid the hang on SNAP-20010109 sshd.

Best regards,

Wojtek

PS. I am using RedHat Linux 6.2 on x86 with updates applied.


--------------------
Wojtek Pilorz
Wojtek.Pilorz at bdk.pl







More information about the openssh-unix-dev mailing list