Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
[root@ ]# logout
There are stopped jobs.
[root@ ]# 

So I need to logout twice to actually logout.

When will this happen?

share|improve this question

2 Answers 2

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.

share|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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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