Pages

Friday, December 14, 2012

Linux error "There are stopped jobs"

This error will come when you try to logout or exit from a terminal and there are some tasks which are running in background. 


surendra@linuxnix.com:~$ ping linuxnix.com
PING linuxnix.com (216.239.38.21) 56(84) bytes of data.
64 bytes from any-in-2615.1e100.net (216.239.38.21): icmp_req=1 ttl=50 time=61.3 ms
64 bytes from any-in-2615.1e100.net (216.239.38.21): icmp_req=2 ttl=50 time=63.2 ms
^Z
[1]+  Stopped                 ping linuxnix.com
surendra@linuxnix.com:~$ exit
There are stopped jobs.
surendra@linuxnix.com:~$ 

If you observe I started a ping program and sent that process to background. And when I try to logout from that terminal I got an error stating that there are still some programs running. To stop this error we have to see if you really like to kill the jobs.

How to kill those jobs?
Execute/press below commands/shortcuts

fg
ctrl+c


How to retain job running though you try to logout?
Just press below commands/shortcuts

ctrl+z
bg
disown

This will allow us to run the process in background though you try to logout.

 

0 comments:

Post a Comment