• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Really quick Unix question....

gopunk

Lifer
what's the command to run a job not connected to your terminal? i.e., after you log off it still runs...

i know there is screen, but there is something else too...
 
thanks guys... i mean one that will start the job immediately... i heard another guy mention it at school, it wasn't cron or at...
 
& ?

that forces the process into the background so that you can still work on the terminal... like

# mozilla &

Also, you can use CTRL-Z then bg to make a foreground process run in the background. and then fg to bring it forward.

 
NOHUP

i think that's what i was looking for... thanks! oh yea and the & stuff works too... i dunno why i thought it wouldn't... probably because whenever i use it with emacs and i close the terminal, emacs dies
 
Eh, you sure & works? & only put things into the background, when you log off your terminal it will kill all your processes.
 
Originally posted by: atom
Eh, you sure & works? & only put things into the background, when you log off your terminal it will kill all your processes.

yea for some weird reason it does... that's what i thought too

i dunno how to get it back though... i can see in top but i dunno how to resume it (bg doesn't show it)...

how do you get it back if you use nohup? or do you just have to look at nohup.out and kill the process if you don't want it anymore...
 
Originally posted by: gopunk
NOHUP

i think that's what i was looking for... thanks! oh yea and the & stuff works too... i dunno why i thought it wouldn't... probably because whenever i use it with emacs and i close the terminal, emacs dies

You can do disown emacs from the terminal.
$emacs &
$disown emacs
or just do "emacs & disown"

I don't know if that answers your original question though...

 
You can also run the process in a subshell and I don't think it will kill it when you log out of your current session. Also, you can configure your shell to not kill background processes when you log out, although I don't think this is that great of an idea personally.

As far bringing back a process to foreground after using nohup, I have no clue.
 
Originally posted by: gopunk
Originally posted by: atom
Eh, you sure & works? & only put things into the background, when you log off your terminal it will kill all your processes.

yea for some weird reason it does... that's what i thought too

i dunno how to get it back though... i can see in top but i dunno how to resume it (bg doesn't show it)...

how do you get it back if you use nohup? or do you just have to look at nohup.out and kill the process if you don't want it anymore...

ps "project name"

kill -9 "process number"
 
Back
Top