nohup is a POSIX command to ignore the HUP (hangup) signal.
Questions tagged [nohup]
70 questions
40
votes
3 answers
How do I fork a process that doesn't die when shell exits?
If I run emacs from the shell:
$ emacs foo &
and then kill that shell, emacs dies.
How can I run a command so that it will not die when the shell dies?
I found references to nohup, but that does not seem to help:
$ nohup emacs foo &
still kills…
sligocki
- 928
39
votes
4 answers
Continue SSH background task/jobs when closing SSH
I have the same question as here but even beyond that.
If I logout/exit the SSH connection, I need my program running in background.
Before exit, I type bg and jobs to check background running task, but after exiting SSH, the program doesn't run, it…
Huei
- 583
18
votes
2 answers
Ctrl+c in a sub process is killing a nohup'ed process earlier in the script
I didn't know whether this belonged on SO (as it is a coding bug) but thought you guys would be more knowledgeable regarding the subtleties of the software used (so maybe even U&L could be considered).
Here's the minimal code script (see edits for…
Hashbrown
- 3,338
- 4
- 39
- 51
18
votes
2 answers
How to attach to a nohup process?
If I start a process with nohup:
nohup WHATEVER &
then how can I see it again? I mean how to attach my terminal to it again under Linux, e.g.: Ubuntu 11.04 - just like with the screen package.
LanceBaynes
- 4,190
14
votes
1 answer
Where is the STDOUT of a disowned program directed to?
As followup of this question, I would like to know where the STDOUT and STDERR of a program on which I've run disown -h is redirected to.
Thrawn
- 335
11
votes
2 answers
After-the-fact remote nohup with tcsh
I have a tcsh instance in an xterm that is running a long-term (weeks?) process. The Xvnc server it's running under went out in the weeds; it's consuming 100% CPU and is unresponsive. (This is a known bug and I know that it's unrecoverable.)
The…
wfaulk
- 6,307
11
votes
2 answers
Nohup over ssh won't return
I am trying to do
[me@myPc]$ ssh me@server "nohup myBashScript.sh &"
My goal is to launch the process on the server, and then immediately return.
It is not working:
The job is started on server, but I still get the output on myPc and bash wait for…
user1219721
- 363
8
votes
3 answers
nohup output redirection to a different file
I use nohup quite often for important long running processes under linux/bash, so much so that nohup time my command with arguments && mv nohup.out my.log is almost an idiom for me.
The problem is that nohup puts both stdout and stderr into…
sds
- 2,108
8
votes
2 answers
Nohup and the difference between logout and exit on a remote shell
I have access to a remote Linux shell for work purposes. I have kept a python script running in the background using nohup.
Now, if I want to exit the session, what is the difference between using logout and exit commands? Will my script keep…
Tim
8
votes
4 answers
Keep a program running after closing a console, after the program has started
Possible Duplicate:
How do I detach a process from Terminal, entirely?
I've a program running in a Unix console on a remote Unix computer. I (stupidly) didn't run it using nohup &, and now I need to close the local console.
Is there any way to…
Thrawn
- 335
5
votes
1 answer
Nohup doesn't work when executing script from Jenkins
I have bash script which executes following
nohup ws --port 8080 &
when executing that script directly on remote server and closing connection - process still exists. But when i am using Jenkins "SSH plugin" - process stops after Jenkins closes…
user454546
- 51
5
votes
1 answer
Nohup & Sass: Process keeps running but, after a while, *.scss files do not get compiled
I am using Sass on a CentOS 5.8 server and want it to keep running after SSH logout, so that other users can edit *.scss files for days or even weeks to come without any need to start the program each time they login (in fact, they don't even have…
maurits
- 151
5
votes
1 answer
Pipe/send command to process running on nohup that accepts input from STDIN
I have a program that I run using nohup program &. This program accepts input from STDIN. Is there any way to send text to the STDIN of a program that is running via nohup?
This is on FreeBSD running bash. I would like to see how this is done on…
vivin
- 1,603
5
votes
2 answers
What's the difference between nohup and ">& nohup.out &"?
nohup renders a process immune to the shell's SIGHUP, but even if I run this from my shell:
bash -c 'while true; do sleep 1; date; done' >& nohup.out &
then log out and log back in, bash is still running and producing output to nohup.out. Is there…
xyzzyrz
- 921
4
votes
1 answer
How to find out is a program run with nohup or not?
There is no difference in ps -ef | grep sleep output to commands:
nohup sleep 60 &
sleep 60 &
In which way can I discover that program is run with nohup?
TheSAS
- 900
- 1
- 6
- 15