nohup is a POSIX command to ignore the HUP (hangup) signal.

learn more… | top users | synonyms

0
votes
1answer
779 views

Starting Resque worker with script doesnt work, starting by hand does

I am trying to figure out why my process doesn't work if started via a script, but works fine if started by hand. Here's the details: script is a resque worker start script. The script location is /...
2
votes
1answer
54 views

Submit password with sudo and execute script with nohup

I would like to download and run a script in the background so the task is independent of the shell and its exit. Moreover this script should be run as sudo, using: echo MY_PWD | sudo -u MY_USER -S .....
3
votes
1answer
37 views

Messages on new terminal after using nohup

I'm trying to run a few commands asynchronously on a login script (.bash_profile). When I open a new terminal, I see messages like this. They also show up when I log onto a system over SSH. Last ...
17
votes
4answers
9k views

nohup vs. Screen

In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use screen in this context. Does screen provide some kind of functional advantage that I am unaware of, ...
1
vote
1answer
56 views

Why i couldn't kill the NOHUP process?

So in order to keep my simple blog running permanently, i used the nohup command: nohup python manage.py runserver 0.0.0.0:8000 Everything worked perfectly, my blog keep running even though i ...
1
vote
1answer
36 views

What happens if I don't use & at the end of a nohup command? [duplicate]

What's the difference between nohup foocommand and nohup foocommand &? I understand that & marks the task/job/process as running in the background but does that make it more resilient than ...
0
votes
3answers
1k views

Kill a nohup mpi process

I have started a program in parallel using the command: nohup mpirun -7 mylongprogram.py & I now want to terminate the program. When I want to kill the process by the command: kill -9 &...
2
votes
1answer
29 views

Why is SIGHUP ignored by daemon(3) only in FreeBSD?

As part of the systemd tmux daemon() discussion on reddit, I've noticed that it's only the FreeBSD version of daemon() libc library call that ignores SIGHUP sigaction(2), but not OpenBSD or glibc/misc/...
0
votes
1answer
26 views

Why are processes run with nohup in rc.local killed?

I have the following script under raspbian jessie: file test.sh contains: #!/bin/sh -e nohup sleep 321 & sleep 120 false exit 0 When run as normal user in a terminal session, I have the ...
3
votes
1answer
66 views

When did bash's shopt huponexit start defaulting to off?

On Monday morning, I logged into a box with ssh and ran the following command: tail -f /var/log/foo/bar.log | grep something_interesting & At some point later in the day, I logged out by ...
0
votes
1answer
43 views

How should I run a .java or a .class file using nohup? [closed]

For the first time I'm just playing around with nohup on top of an Ubuntu server. I read few docs about nohup and got to know about the running commands with options such as nohup ./server.sh &. ...
1
vote
1answer
48 views

Can't run multiple files with nohup

This is what which is happening [4]+ Stopped sudo nohup exec php socket_axd.php adnan@vm085:~/server/axdchat/Server$ sudo nohup exec php socket_axd.php & [5] 2312 adnan@vm085:~/...
0
votes
2answers
31 views

nohup with at the end <&- [duplicate]

nohup grunt server:debug >grunt.out 2>&1 <&- & I have a nohup command that ends with <&- . What does this direction do? Can some explain with pointers. I did search ...
1
vote
1answer
21 views

Is there a difference between nohup and nohup in a screen?

I am currently running mathematica on a Linux cluster, I want the job running stably even if I log out. So I use nohup. However, I found sometimes nohup terminates without any sign (I can't see any ...
0
votes
1answer
3k views

Nohup process not running into ssh

I have a question on the use of nohup in an ssh session. During more than three years my java software executed the following command daily using a remote ssh session: cd some_path; chmod 777 script....
1
vote
2answers
44 views

Why does `nohup top` cut the output lines?

I want to use nohup to periodically log the output of top (every 15s). For that, I log into the server with SSH, carry out the following command, and log out again: nohup top -b -c -d15 & The -...
0
votes
0answers
17 views

What is the difference between the SIGHUP generated by typing “exit” in the SSH shell terminal vs clicking the “X” button in the PuTTY window?

Referring to this question, I am trying to use nohup <command> <arg> & to continue to run a command in the background after I logout from the SSH shell terminal. However, the ...
0
votes
2answers
72 views

Redirect stdout to file with nohup doesn't work

I'm trying to run a C-program in the background. I also want to save the stdout-outputs of the program. But if I try the following, nohup only redirects stderr-outputs to the logfile.txt: nohup ./...
1
vote
2answers
122 views

How to redirect STDIN of background process?

In my Ubuntu, i run java application in background. I use bash script to run it and now it looks like: nohup java -jar app.jar & exit 0 The problem that i want to be able to write an input ...
4
votes
1answer
354 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
14
votes
4answers
44k views

Why use “nohup &” rather than “exec &”

I know that, nohup being a binary, it can be reached from any shell. But the exec built-in probably exists in every shell. Is there a reason to prefer one of them, to the other?
4
votes
3answers
240 views

How to completely detach a process

I want to spawn a process and run it at the top level so that when the shell exits, the process keeps running. I had mistakenly thought that nohup would do this, but when I exit from the shell (the ...
2
votes
2answers
358 views

nohup … & doesn't work as expected in docker script

I have a simple Dockerfile like this FROM ubuntu:latest ADD run.sh /run.sh CMD /run.sh In run.sh, I have this (also deadly simple) #!/bin/bash nohup awk 'BEGIN { while (c++<50) print "y" }' &...
3
votes
2answers
142 views

Order between `nohup`, `&` and redirection?

What is the correct order between nohup, & and redirection, when using together? Why are other orders not correct? For example, $ nohup firefox& &> /dev/null $ nohup firefox &&...
0
votes
0answers
45 views

Ways to make a process survive its parent shell's exiting?

In order for a process to survive its parent shell's exiting, what necessary and sufficient conditions does the process need to meet? Specifically considering signals, what signals should be ...
4
votes
3answers
1k views

Why is chromium-browser killed when I close the terminal despite nohup?

This question is old, and I am still not clear about why. Original question in 2014: In a Gnome Terminal tab, I ran $ nohup chromium-browser & But when I close the terminal tab, chromium-...
0
votes
1answer
80 views

Output is not getting written in nohup.out while starting the server from jenkins

I have written a shell script to start a server which is mentioned below and this script is executed from jenkins via ssh. nohup ./startWeblogic.sh & The server is getting started alright but ...
3
votes
1answer
134 views

Stdin input to a command with nohup

from http://www.gnu.org/software/coreutils/manual/html_node/nohup-invocation.html nohup runs the given command with hangup signals ignored, so that the command can continue running in the ...
0
votes
0answers
45 views

Have I created a daemon successfuly?

In gnome terminal under Ubuntu 14.04 In a tab, I run $ nohup sleep 1000 & &>/dev/null I took note of its pid 20643. Then in another tab, I check the sleep process: $ ps -p 20643 -o ...
26
votes
4answers
22k views

How to Execute multiple command using nohup

I need to execute multiple commands using nohup. Each command should be executed after the previous command. I used this command as an example: nohup wget $url && wget $url2 > /dev/null ...
263
votes
2answers
76k views

Difference between nohup, disown and &

What is the difference between $ nohup foo and $ foo & and $ foo & $ disown
0
votes
1answer
73 views

nohup nice job aborted when disconnected

I've learned that "nohup" command allows the command to keep running if you lose your connection or need to logout. I'm running "nohup nice my command &" in remoter through shh, and after my lap ...
0
votes
1answer
50 views

Circumvent deletion of screen session and nohup processes on logout

Everywhere I look I see that screen is for keeping a session open so that you can come back to it after disconnection. But this doesn't seem to be the case for a system that I ssh to. Do I ...
4
votes
3answers
699 views

Why do 'nohup' and 'disown' not work on SoX (invoked as 'play')

I can run this command: $ play mylist.m3u And music plays. I can then press Ctrl-Z to suspend the job, and issue bg to have it run in the background. However, if I then run disown and exit, the ...
3
votes
2answers
2k views

Disown won't take -h option

I'm running a command that I now realize I'd like to leave running after I close my SSH session. I didn't start it with a & argument, but I have put it in the background (CTRL-z, bg). Now I'm ...
1
vote
1answer
35 views

Long running script stops sending output to file

I have a script that I'm using to capture some status of the server at 10 second intervals. The script is as follows: for (( ; ; )) do /usr/local/apache/bin/apachectl fullstatus sleep 10 ...
1
vote
2answers
93 views

Command keeps exiting, despite use of `nohup`

What am I doing wrong here? I Log into the first server (using putty) and run the following query: sh -c 'nohup mysqldump -hxxx -Pxxx -uxxx -pxxx --dump-slave --include-master-host-port --apply-...
3
votes
4answers
222 views

Is it possible to run nohup and still see verbose output on screen

I have a fairly simple shell script patch file (in essence, some scripting plus rpms all in a single file). It works great but I encountered something I wasn't expecting: a user accidentally closed ...
10
votes
5answers
17k views

How to totally fork a shell command that is using redirection

I've written quite a few shell scripts over the years (but I'm certainly not a sysadmin) and there's something that always caused me troubles: how can I fork a shell command immune to hangups in the ...
0
votes
0answers
76 views

How to run a command from vim and direct output to /dev/null

When writing a .tex file, I want to be able to view the pdf of the file. I remapped \e to show the pdf file in evince as below: nnoremap \e :!nohup evince %:r.pdf & >/dev/null 2>&1<...
0
votes
1answer
70 views

How do I stop a program sent to run in background through ssh

I started a program in the background on a remote machine through ssh using nohup ./program & I want to kill/stop this program on remote machine as it seems like an infinite loop. How can I do ...
1
vote
0answers
121 views

nohup is not working when called from root folder

When I execute the nohup command from the same folder it's working fine (server.php is used to listen to a port 7070) root@servername:/var/www/html/admin# nohup php server.php & [4] 2803 root@...
-1
votes
2answers
95 views

execute multiple commands after ssh

I need to pass a bash command into another process that needs to do the following: ssh into a computer. This does not require a password prompt. set up some environment variables: source path/to/...
3
votes
1answer
634 views

Exiting terminal running “nohup ./my_script &” => “You have running jobs”. OK to exit?

Say I run the following on a remote box with the idea of preventing killing the job when I disconnect the terminal. nohup ./my_script.sh & When I try to exit my terminal, I got the following ...
0
votes
1answer
90 views

what is the difference between starting a command with nohup and &? [duplicate]

nohub and & seem to have a similar effect on the surface, they both start processes without occupying the shell from which they have been started, how do they differ on a deeper level?
0
votes
2answers
185 views

nohup not updating nohup.out

Boiling down to the smallest problem here is a simple python script that I want to run using nohup on linux. I run it using the following (on linux): nohup python test.py & The command seems ...
1
vote
2answers
65 views

Automatic Background Processes

I'm running my Raspberry Pi off an SSH server, and want to be able to access it out of home. Sure, all I need is an IP. But with my terrible internet, it's constantly dropping out. My IP is constantly ...
2
votes
3answers
165 views

Preventing terminal disconnection from killing a running job in zsh [duplicate]

I went through the top answer to this question: Difference between nohup, disown and &, and I read specfically the following: With disown the job is still connected to the terminal, so if the ...
8
votes
2answers
25k views

nohup: ignoring input and redirecting stderr to stdout

I am starting my application in the background using nohup as mentioned below - root@phx5qa01c:/bezook# nohup java -jar ./exhibitor-1.5.1/lib/exhibitor-1.5.1-jar-with-dependencies.jar -c file --...
0
votes
0answers
128 views

Start a process from (noninteractive) shell script (cgi) and keep it running when script ends

I want a cgi script to start a process which stays alive after the cgi script exits. I tried: #!/bin/bash nohup process-to-keep-running & That works fine, if I run the script from an ...