2

I'm having a weird issue. Sometimes on a quite loaded server i get a bunch of :

# apt-get install sun-java6-jre
[1]+  Stopped                 apt-get install sun-java6-jre

or even

# (just hitting Return)
[1]+  Stopped                 apt-get install sun-java6-jre sun-java6-fonts

And then i can't do anything; all that does is returning me this 'stopped' line ...

What does that mean ? Too many processes ? How can i solve this ...

1
  • 2
    It means you've got jobs running in the background - maybe ones that would like to communicate with the user (to report that they've completed, perhaps, or to get an answer to a question, or ...). Oct 31, 2011 at 15:39

2 Answers 2

2

+Stopped means someone (probably an admin) sent the process a SIGTSTP (STOP signal) which puts the process on hold (using Job Control). It's the same what happens when you press Ctrl+Z.

This can probably be automated to keep runaway processes in check on a loaded server.

To resume the process, try "fg".

2
  • This is a pretty good hint considering the OP mentioned 'on a quite loaded server' +1
    – sehe
    Oct 31, 2011 at 16:05
  • 1
    or bg to resume it in the background (as if you'd started it with a & at the end) Nov 2, 2011 at 8:25
2

See Job Control

You can use

jobs # list the background jobs (by id number)

fg # to foreground the last background job

fg 3 # to foregroun background job with id '3'

Note: sometimes people will inadvertently spawn jobs in the background by failing to escape special characters:

 wget http://sample.org/file.txt?ts=122&uid=guest

instead of

 wget 'http://sample.org/file.txt?ts=122&uid=guest'

2
  • tried : "jobs" and still have that stopped message coming ...
    – Disco
    Oct 31, 2011 at 15:48
  • all i did was apt-get update, so no mistake about a background task typo.
    – Disco
    Oct 31, 2011 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .