That's right!
I am logged in to a remote machine here, ran the ping command and put it in background...
output to a file
Last login: Tue Nov 20 21:38:26 2001
[david@Alpha david]$ ping
www.redhat.com > ping.out &
[1] 2790
[david@Alpha david]$
I logged out and back in again
the ping was still going
Last login: Wed Nov 21 13:11:07 2001 from 10.0.0.2
[david@Alpha david]$ tail -f ping.out
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=99 ttl=241 time=74.295 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=100 ttl=241 time=74.760 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=101 ttl=241 time=72.273 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=102 ttl=241 time=73.324 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=103 ttl=241 time=76.790 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=104 ttl=241 time=73.791 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=105 ttl=241 time=73.862 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=106 ttl=241 time=76.313 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=107 ttl=241 time=74.728 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=108 ttl=241 time=74.297 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=109 ttl=241 time=74.359 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=110 ttl=241 time=73.991 msec
64 bytes from
www.redhat.com (216.148.218.195): icmp_seq=111 ttl=241 time=74.152 msec
[david@Alpha david]$
However had I not output it to a file it would be printing to the terminal which is closed when I disconnect, background or not.
[david@Alpha david]$ ps -A |grep ping
[david@Alpha david]$
[david@Alpha david]$ ping
www.redhat.com
PING
www.redhat.com (216.148.218.197) from 34.45.56.678: 56(84) bytes of data.
64 bytes from 216.148.218.197: icmp_seq=0 ttl=243 time=80.726 msec
64 bytes from 216.148.218.197: icmp_seq=1 ttl=243 time=80.964 msec
64 bytes from 216.148.218.197: icmp_seq=2 ttl=243 time=78.153 msec
64 bytes from 216.148.218.197: icmp_seq=3 ttl=243 time=81.255 msec
64 bytes from 216.148.218.197: icmp_seq=4 ttl=243 time=78.535 msec
64 bytes from 216.148.218.197: icmp_seq=5 ttl=243 time=78.666 msec
64 bytes from 216.148.218.197: icmp_seq=6 ttl=243 time=78.128 msec
64 bytes from 216.148.218.197: icmp_seq=7 ttl=243 time=77.931 msec
64 bytes from 216.
Last login: Wed Nov 21 13:20:18 2001 from 10.0.0.2
[david@Alpha david]$ ps -A |grep ping
[david@Alpha david]$
[david@Alpha david]$ ping
www.redhat.com &
[1] 3164
[david@Alpha david]$ PING
www.redhat.com (216.148.218.197) from 34.45.56.678: 5
6(84) bytes of data.
64 bytes from 216.148.218.197: icmp_seq=0 ttl=243 time=79.805 msec
64 bytes from 216.148.218.197: icmp_seq=1 ttl=243 time=79.587 msec
64 bytes from 216.148.218.197: icmp_seq=2 ttl=243 time=78.302 msec
64 bytes from 216.148.218.197: icmp_seq=3 ttl=243 time=78.789 msec
64 bytes from 216.148.218.197: icmp_seq=4 ttl=243 time=81.991 msec
64 by
Last login: Wed Nov 21 13:23:20 2001 from 10.0.0.2
[david@Alpha david]$ ps -A |grep ping
[david@Alpha david]$
sending it to a file without the bg command (&) will not let it live either..
If I disconnect it dies.
[david@Alpha david]$ ping
www.redhat.com > ping.out