[root@ ]# logout
There are stopped jobs.
[root@ ]# 

So I need to logout twice to actually logout.

When will this happen?

link|improve this question

40% accept rate
feedback

2 Answers

up vote 1 down vote accepted

When the shell still has jobs stopped in the background. Use jobs to see the current jobs, and fg %<n> to bring a job to the foreground so that you can end it.

link|improve this answer
so the 1st logout is false,it actually just terminates the background jobs? – locale Jun 8 '11 at 8:30
It makes you aware that there are background jobs. The second actually closes the shell. – Ignacio Vazquez-Abrams Jun 8 '11 at 8:32
It says There are stopped jobs. but actually never prints them out...isn't this weird? – locale Jun 8 '11 at 8:34
It's your, uh, job to determine whether or not you care about them. – Ignacio Vazquez-Abrams Jun 8 '11 at 8:40
locale: ... and you can use "jobs -l" to see what the stopped jobs actually are. – Janne Pikkarainen Jun 8 '11 at 9:42
feedback

You're being prevented from logging out because you've suspended a task during your console session, probably using CTRL-Z. This task is still active, but suspended in the background.

The fg command will bring the task back to the foreground and allow you to kill it, or figure out what's going on.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.