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

learn more… | top users | synonyms

1
vote
0answers
32 views

Any caveats to using bash disown from a shell script as an alternative to screen?

I have a process which starts and outputs to a log file. The script which starts it launches it in a GNU screen and then follows the log with tail. The process will immediately begin writing to the ...
2
votes
1answer
66 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
51 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 ...
1
vote
1answer
42 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 ...
2
votes
1answer
36 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
42 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
71 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
66 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
52 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
35 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
26 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 ...
1
vote
1answer
73 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
2answers
57 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
19 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
93 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
178 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 ...
2
votes
2answers
471 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" }' &...
0
votes
0answers
51 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 ...
0
votes
1answer
91 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 ...
0
votes
0answers
49 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 ...
3
votes
2answers
173 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 &&...
3
votes
1answer
179 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
1answer
87 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
55 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 ...
2
votes
1answer
46 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
102 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
249 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 ...
0
votes
0answers
77 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
74 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
votes
2answers
99 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
729 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
2answers
197 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
68 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
177 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 ...
0
votes
0answers
135 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 ...
3
votes
3answers
1k views

Using `nohup` to Import MySQL Dump on Debian Server

I am trying to import a mysqldump file into my mysql database, but my (putty) connection to the server keeps timing out halfway through. I tried to use nohup . . . . & but this doesn't appear to ...
1
vote
0answers
135 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@...
2
votes
2answers
146 views

how to use nohup while still sending stderr to the terminal

nohup automatically redirects stderr to stdout, but I want to send it to the terminal (it shows progress). How can I do that?
2
votes
2answers
433 views

stderr gets flushed before stdout, when using file logger

My python code: import sys print "i am a daemon" print "i will be run using nohup" sys.stderr.write("i am an error message inside nohup process\n") When i run the code as python a.py, it shows, i ...
0
votes
0answers
185 views

Avoiding heredoc sh[process_number].* files in /tmp directory

I have a .ksh file which logs into sqlplus and runs some queries. The block of code is something as mentioned below: //Other things done in ksh sqlplus -s @connect.sql << EOF Query1 Query2 ...
2
votes
1answer
692 views

Get the time when nohup R program finishes

I want to get the time when program finish. But it always show the same time. Here is my shell script. But it always show that START TIME is same as END TIME. START=$(date +"%r") nohup Rscript ...
2
votes
1answer
1k views

what are practical uses of stdbuf or nohup?

I have to finish a writeup of a few coreutils commands for a course at the moment, and I can't think of a starting point for a small practical code example that demonstrates the potential uses of ...
1
vote
1answer
289 views

Is there any disadvantage of executing a shell script using nohup?

To execute a shell script in background and without an interruption, we use nohup command. For example: $nohup mytest.sh & Press ALT Press Enter Is there any drawback or disadvantage of this ...
0
votes
1answer
399 views

Keep program running after logging out SSH -X, and reopening it later [duplicate]

I need to login to my school computer where I am running an experiment. I am logging via SSH -X since it uses a custom made GUI application. I want to be able open the program, make it start ...
0
votes
0answers
26 views

how can I redirect the grepped output of tail -f to a file? [duplicate]

I want to do this: tail -f /var/log/apache2/access.log | grep 'POST \/review' But I want the output to go to a file and I want this to run constantly for a day or two. I tried a simple script ...
4
votes
1answer
456 views

Why is `setopt nohup` required to make `nohup watch` work in zsh?

In zsh, setopt nohup seems to be required to make nohup work, as follows: # nohup does not work without setopt nohup ➜ /tmp zsh ➜ /tmp nohup watch ls & [1] 31556 nohup: ignoring input and ...
0
votes
1answer
92 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?
3
votes
1answer
260 views

What is the difference between letting nohup append to 'nohup.out' and explicitly redirecting it to a file?

Consider the following scenario: tail.sh: #!/bin/bash tail -f test.txt invoke.sh: #!/bin/bash nohup ./tail.sh & invoke_explicitredirect.sh: #!/bin/bash nohup ./tail.sh > out.log & ...
0
votes
1answer
470 views

nohup, screen and tmux not working when closing connection on yocto linux (intel edison)

I have an Intel Edison with Yocto Linux and standard configurations. It had nohup pre-installed and I managed to install both screen and tmux (by compiling them from sources). Now, I would like to run ...
1
vote
1answer
2k views

How to keep running a process in Android when disconnecting adb terminal? command “nohup” not found

I'm trying to analyze the reason for random reboots of my phone (see here). Therefore I wanted to record the logcat and kernel messages till the restart to see the logs even after the usb disconnects, ...