sleep process doesn't die when ssh connection is killed

by Rob Lourens   Last Updated July 13, 2019 01:26 AM

In one terminal I run this command:

ssh myhost 'sleep infinity'

In another terminal I see it with

ps ax | grep sleep

Then I use ctrl+C to kill the ssh process. But, ps shows that the sleep infinity command is still running. Why? Any other process launched from an ssh session dies when the ssh session is terminated.

Tags : linux ssh process

Related Questions