On most UNIX systems this will not leave a process running:
ssh example.net sleep 1000
<<CTRL-C>>
I have tested this behaviour on
aix
centos
debian
dragonfly
freebsd
hpux
irix
mandriva
miros
netbsd
openbsd
openindiana
qnx
redhat
scosysv
solaris-x86
solaris
suse
tru64
ubuntu
unixware
They all clean up as expected. On HURD the login shell is killed as expected, but the sleep is left running as a child of init. Why? And can it be mitigated?
$ uname -a
GNU hurd 0.5 GNU-Mach 1.4-486/Hurd-0.5 i686-AT386 GNU
$ echo $SHELL
/bin/bash
$ /bin/bash --version
GNU bash, version 4.3.24(1)-release (i486-pc-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.