I have a program reading from standard input in a while
loop. I need to run it in the background, even after I close the console. If the name of the program is prog
, how can I do that?
相关问题
- How to get the return code of a shell script in lu
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Invoking Mirth Connect CLI with Powershell script
- Error building gcc 4.8.3 from source: libstdc++.so
You might be looking for
screen
When I started with UNIX 24 years ago I had the same question.
If you are a newbie then what you are looking for is
tmux
: Here you can start a program that reads from STDIN, log out, log back in some time later, and continue.Otherwise
nohup
is the correct answer.You'll have to provide stdin redirected from some source other than the keyboard (which disappears when you log out), but
should do the trick.