Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run

nohup bash -c "while [ true ]; do echo test; done"

from PuTTy SSH client, but after this process is not running in background instead nohup keeps to be foreground process in shell.

SW version: nohup (GNU coreutils) 8.5

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted
nohup bash -c "while [ true ]; do echo test; done" &

Nohup provides you immunity to hangup signals. But it does not automatically set the process to background.

It's the & at the end of the command that causes it to run in the background.

share|improve this answer
1  
Thanks for the precision @Randy Orrison –  M'vy Apr 12 '11 at 8:01
add comment

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.