Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nohup]

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

0
votes
1answer
29 views

[1]+ Exit 125 nohup [on hold]

I am running the following command: nohup ./run_hyper_param_tuning.sh> ../../logs/hyper_model_15_b_Jan.txt 2>&1 & echo $! >save_pid.txt It has been always working but suddenly it ...
1
vote
1answer
24 views

No nohup logs on remote server

I'm trying to start a proccess on remote server with ssh. I need to log stdout on target server (not the local one) Here is the script: sshpass -p mypwd ssh root@myserver.com nohup java -jar /tmp/...
1
vote
0answers
22 views

Script get in process multiple times

I have a script that starts, kills or restarts several java programs. However, when I execute it, it ends up running multiple multiple times in the background. This is my script: #!/bin/bash export ...
0
votes
0answers
24 views

Terminal Hangs when running bot

I have a bot installed on my Azure Linux VM running Ubuntu 18.04. I am running the command to start my bot, and it returns an error (see below). The console freezes as well apparently because it ...
0
votes
0answers
30 views

-bash error when trying to run bot [duplicate]

I have a bot installed on my Azure Linux VM running Ubuntu 18.04. I am running the command to start my bot, and it returns an error (see below). $ nohup python3 bot.py > nohup_bot.out -bash: ...
1
vote
0answers
27 views

Program start from interactive shell fails when shell script initiated by launcher

[This post has been edited from the original text to add the results of further investigation and get to the point more quickly -- Thanks @ctrl-alt-delor] Why does this script: #!/bin/bash read -p "...
-1
votes
0answers
37 views

Modem hangup when running script with with nohup, but not otherwise

I have script A which launches script B managing the modem. Script A is launched at boot with nohup: nohup /path/script_B.sh 0<&- &>/dev/null & After this, the modem fails with ...
0
votes
1answer
32 views

Does nohup apply only to a child process of a shell process, but not to a child process of a non-shell process?

nohup is an external program. How can it change the action of SIGHUP by a child process of a shell process to be "ignore"? (in terms of some arguments when the child process invokes fork() and/or ...
16
votes
2answers
1k views

Do `disown -h` and `nohup` work effectively the same?

disown causes a shell not to send SIGHUP to its disowned job when the shell terminates, and removes the disowned job from the shell's job control. Is the first the result of the second? In other ...
0
votes
1answer
51 views

Automatically restarting a process when it dies?

I have a process running on a raspberry pi. After ssh ing into in to the process is started like this: nohup .../blah/blah & IIUC this allows me to log out of the pi and the process keeps ...
1
vote
1answer
117 views

Unable to write to file in shell script when running command in background

I have the following commands that need to be run in a shell script, nohup command >> help.out & When I run the script from terminal the nohup command runs in the background and the next ...
4
votes
2answers
151 views

No log content with tail but when terminating a process I see content with less

Basically, I am running: nohup ./executable &> /tmp/out.log & In order to make sure the process is running I ran the command: tail -f /tmp/out.log But the only thing I can get from tail ...
-1
votes
1answer
43 views

Use nohup and return to terminal and pipe to logger

I can redirect output to logger like this: nohup bin/mytask | logger But the process hangs, and my cursor doesn't return to the terminal after the command is sent. (I would have to return to ...
1
vote
2answers
46 views

Why application does not run from SCREEN without delay?

Suppose we need to run application in screen and keep it running when screen exits. The following command does the job, but only if "sleep 1" is appended to it. Why it does not work without "sleep 1"? ...
0
votes
1answer
168 views

Is there a difference between running a program as a daemon and using nohup with & to run the program?

I'm trying to run my program as a daemon but the way I am doing it currently requires root access. I was wondering if I could use the nohup command with & to push it to the background instead of ...
0
votes
2answers
424 views

Run a script every minute without cron and allowing children

I've written 2 php scripts one worker and one master. If I run master manually it checks a rabbitmq system and spawns 1 worker for each queue it detects. Then if I run master again it checks see if ...
0
votes
0answers
86 views

remote process run through ssh gets killed if UI is closed

I have written a script which essentially does 2 things: Runs a UI for listening to the actual program running on the server remotely run the program on the server All goes well, the UI starts, then ...
1
vote
2answers
65 views

Is it possible to execute a command on server even when I'm disconnected from remote?

Scenario I'm using cp to copy some very big folders, or using tar to compress some big folders. But I have very limited power on my laptop and can't find a power connection nearby. Question Is ...
1
vote
2answers
125 views

sudo nohup and redirection

Trying to figure out the correct Cmnd_Alias for the sudoers file The command i which to run without any password is the following: sudo /usr/bin/nohup /etc/init.d/axtty start >/dev/null 2>&...
0
votes
0answers
50 views

Why does nohup command interrupt?

I put a command in .bash_profile file. The command is: nohup stdbuf -oL -eL sysdig -c spy_users 1>>/path/to/out 2>>/path/to/err & While I am working on terminal it appears: [1]+ ...
0
votes
2answers
648 views

Get python process ID for a flask web site and/or port number?

I have some web applications that I wrote with python flask. I know which port I started each one on and each was started using nohup. Each one was started with something like nohup python mywebapp.py ...
0
votes
1answer
66 views

Do I really need to use nohup? [duplicate]

I would like to let run my script on background on my server. I red about nohup. I have my script.py. I run it like this: python3 script.py& It runs on background even when I close terminal. The ...
9
votes
1answer
2k views

Why nohup background process is getting killed?

I tried starting a shell script via a remote session, which starts a process in the background using the command. nohup python3 run.py > nohup.out & When the remote session is closed, the ...
2
votes
1answer
138 views

Does nohup try to arrange for the program not to have a controlling terminal?

Gilles said nohup and disown both can be said to suppress SIGHUP, but in different ways. nohup makes the program ignore the signal initially (the program may change this). nohup also tries to ...
0
votes
0answers
144 views

Why doesn't a Gradle with task to call npm install not work with nohup

I have a gradle app with the following task... task npm(type:Exec) { if(System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")){ workingDir = "${projectDir}" ...
0
votes
3answers
218 views

Using nohup and time with different outputs

I want to run an executable main and redirect all outputs to /dev/null, meanwhile I measure its runtime with time and write the results to runtime.out. Since the task is long I also have to run the ...
0
votes
1answer
206 views

Can I run the nohup command from tcsh

I am looking into the nohup command and I am not sure which shells it support. It seems as if this program works differently in bash and tcsh. What I tried was something very simple. nohup --help ...
0
votes
0answers
46 views

renice alias and release terminal afterwards

I am trying to permanently run qgis with higher priority. I added the following line to my .baschrc (ubuntu 17.10, gnome): alias qg='sudo nice -n -10 nohup su xyz qgis && disown' The ...
2
votes
1answer
638 views

Issues with “nohup” on Linux instance on EC2 Amazon Web Services

I am working on the Ubuntu system on Amazon Web Services EC2. I have created an instance and need to run a node.js server on the system. Once I ssh into my working directory and use the following ...
2
votes
0answers
126 views

Detached process still dies with parent [duplicate]

I am trying to detach a process completely from a bash script, and then kill the bash script with Ctrl+C and have the detached process keep running. My code currently looks like this: nohup ${SHELL} -...
4
votes
3answers
405 views

On the desktop with Bash, should I use '&', nohup, disown, or some combination of the three to start a process and have it run completely on its own?

When I run these four commands on Xubuntu 16.04, either locally or over ssh, they all seem to do the exact same thing: export DISPLAY=:0.0 #not necessary unless you have logged in over ssh instead of ...
0
votes
0answers
513 views

nohup: failed to run command 'unbuffer': No such file or directory

I am trying to run a simple command nohup unbuffer python manage.py runserver > logs/django_server & I have run this command several times before on my local machine, but when I try to run ...
4
votes
1answer
704 views

Syntax error in nohup (…)

I am trying to test the nohup command in the bash shell by executing a command in the background and logging out and back in again and expecting the output of the command to be in the nohup.out file. ...
2
votes
1answer
1k views

How do I wait for nohup jobs to finish within a shell script?

I have the following script: echo "$wk" | while read -r a b; do counter=$(($counter+1)) nohup sh -c 'impala-shell -d nielsen -f query.sql --var=dt=$a --var=incre=$b; echo $a,$?>>$...
1
vote
0answers
583 views

Remote copy via SCP doesn't work in background

The situation: I'm switching file servers at home. I want to copy tons of data from one Synology Disk Station to another. My Approach: #Via SSH on the new server: nohup scp -r ${old_server}:. . I ...
0
votes
1answer
58 views

How do I implement/enable blanket nohup in the shell?

Something like a shell option or "mode" that protects all GUI processes run within that session from being killed when I kill the shell. It would be the equivalent of using nohup for each of the ...
0
votes
1answer
1k views

nohup is not working as I am exiting the terminal

I was trying to use nohup like that: nohup python fibo.py & > a.out When I do so and try to exit from the shell it prompts that "you have running jobs". But that should not be the case. $ ...
-1
votes
1answer
173 views

Sometimes it's convenient to use ` read -t 3 ` instead of ` sleep 3 `. How do I make it work with `nohup`?

Sometimes it's convenient to use read -t 3 instead of sleep 3. How do I make it work with nohup? nohup bash -c ' date; read -t 3; date ' | tail -n 2 nohup.out As you can see, read -t 3 does not wait ...
1
vote
2answers
525 views

Running picocom in the background without open session

I would like picocom to log serial data on a remote computer, without having to keep my ssh session to the remote computer alive. I have tried: picocom <my options> This dies when I logout. ...
2
votes
1answer
3k views

Why process killed with nohup

I want to run a process in background without killing it on shell exit, according to Nohup concept the following command should work until I kill it manually: nohup uwsgi --http :8008 --module ...
0
votes
0answers
275 views

how to clear memory used by a killed nohup process

I started a background process on my server like this: nohup foo & Then I stopped the process using: kill pid However, I found that the process was killed without releasing momery, both CPU ...
0
votes
0answers
80 views

using nohup with virtualbox in terminal in x

When I start a VirtualBox virtual machine from a terminal within X, using nohup, the virtual machine closes after I exit out of X. This is confirmed by both listing virtual machines, and looking at ...
0
votes
1answer
623 views

for loop in nohup

I am trying to run bash script which run 8 for loops simulatenously. one of the my for loop likes below for i in 00 01 02 03 04 ; do cat $INDIR/sys*$1.$i*csv | awk -F '\xac' 'BEGIN{OFS=";";} ($4 == ...
1
vote
0answers
166 views

nohup ssh on osx

The following two commands (aligned to highlight syntactical changes), which differ only in the means by which commands are delivered to the shell, work fine on receivers running a variety of linux-...
2
votes
1answer
161 views

Pipe nohup output to logger w/ different priorities

I've got a third-party Python script to run in background using nohup. And instead of piping the output to a file I'd like the output to be appended to the system log using logger. Added to that I ...
0
votes
1answer
187 views

unix nohup logs are filled with 0 bytes [closed]

I am running the monitoring scripts in the background. They are supposed to all day (24x7). In the script, based on the monitor output I have a function to start a process using nohup, redirecting ...
0
votes
1answer
179 views

trying to use nohup but keep getting another windows to show up

i want to launch windows 10 from virtualbox and i'm created a shortcut to my desktop and click on proprieties to get the commend line to start windows 10 from a menu, so i put the command in the ...
1
vote
1answer
368 views

Closing terminal closes the application called through nohup

As far as I know, nohup signals ignores SIGHUP signal sent by the terminal to the application but the application can change that. I'm running Spotify through the command nohup spotify & and when ...
2
votes
1answer
589 views

Running a script when background process crashes

I'm running an app created using Spring boot. but for last sometimes i'm seeing it getting crashed. I am running this using nohup. I want to attach a hook to it, so that when this process stops a ...
3
votes
1answer
10k views

nohup: failed to run command `.': Permission denied

I tried execute my script using: nohup . test.sh and nohup . ./test.sh However, I got: nohup: failed to run command `.': Permission denied each time. What I'm really trying to do is in my script ...