Questions tagged [nohup]

nohup is a POSIX command to ignore the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out.

nohup is a POSIX command to ignore the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. The HUP (hangup) signal is by convention the way a terminal warns depending processes of logout.

717 questions
15
votes
2 answers

How to limit size of nohup.out logs

I use the command: nohup & and it logs to the nohup.out file, however this log file could get pretty BIG so was wondering if there was a way to automatically save off the output to nohup1.out, nohup2.out nohup3.out etc when the…
k.nguyen
  • 179
  • 1
  • 2
  • 8
15
votes
4 answers

Error: EBADF, bad file descriptor when running node using nohup of forever

I have a problem with node.js running a small web server serving files from the file system. When starting it with node server.js it works like a charm but when starting it with nohup or forever node.js can't find the files.
javabeangrinder
  • 6,939
  • 6
  • 35
  • 38
14
votes
4 answers

Removal of the nohup -file during the execution

I did the following: nohup find / & rm nohup.out Oddly, the nohup -command continued to run. I awaited for a new file to be created. For my surprise there was no such file. Where did the stdout of the command go?
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
14
votes
8 answers

Python + Ubuntu Linux + nohup error: [1]+ Exit

I have a python script, practice_one.py, that I’d like it to run forever in Ubuntu Linux, and has the following: while True: # Code And I attempted nohup python practice_one.py & but got the message nohup: ignoring input and appending output…
Jo Ko
  • 7,225
  • 15
  • 62
  • 120
12
votes
5 answers

Nohup does not work in OSX

Bash: $nohup sleep 10 & but when I close the terminal: Any ideas? ideally I want to run Mongodb in the background.
Mr. Demetrius Michael
  • 2,326
  • 5
  • 28
  • 40
12
votes
4 answers

Run a java program in backend

Hi all i want to run a java application as backend process.that is like tomcat server.For that i had developed one application.and made one class as main class and calling from one script file .i.e(startup.sh) file.in startup.sh file i was calling…
java tech
  • 137
  • 1
  • 2
  • 10
12
votes
2 answers

running nohup command on script that takes all parameters

I am trying to run a script with nohup, but the command happens to take an entire line of parameters with the variable $*. I try running the command like this: nohup time ./build_all all & But this is giving me the following error in…
Flethuseo
  • 5,969
  • 11
  • 47
  • 71
12
votes
4 answers

How can I run a dotnet application in the background using sudo on Linux?

I am experiencing some weird problems that I'm not sure how to solve. I am using CodeDeploy to deploy my applications to an AWS EC2 instance, and in there I need to specify a script to execute the processes on my instances, one of which is a .NET…
jjmcc
  • 795
  • 2
  • 11
  • 27
12
votes
4 answers

Nohup for Python script not working when running in the background with &

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 to just not do anything, nothing is appended to…
user2399453
  • 2,930
  • 5
  • 33
  • 60
12
votes
3 answers

nohup doesn't work with OS X Yosmite - get error "can't detach from console no such file or directory"

I use nohup to run a command from a php application (I have a web page that sends POST request to php server to start a shell script in background). It's something like exec('nohup /home/user/test.sh > /home/user/test.log 2>&1 &') This worked fine…
weilan
  • 121
  • 1
  • 4
12
votes
5 answers

Nodejs nohup dieing without an exception

I am writing my first NodeJS app but for some reason it seems to die unexpectedly after a short amount of time. I have no clue what would be causing it. The process runs fine, even works as expected, then for some reason it just stops. The nohup log…
Lee
  • 5,816
  • 6
  • 45
  • 61
12
votes
4 answers

Why do unix background processes sometimes die when I exit my shell?

I wanted to know why i am seeing a different behaviour in the background process in Bash shell Case 1: Logged in to Unix server using Putty(SSH) By default it uses csh shell I changed to bash shell typed sleep 2000 & press enter It gave me the…
user177558
11
votes
1 answer

How can I redirect nohup output to a specified file?

Everything I have tried from other examples I have found on SO don't seem to work. I am trying to run my application using nohup but append the output of the application to a file. I have tried some of the following. None of which seem to…
jjmcc
  • 795
  • 2
  • 11
  • 27
11
votes
4 answers

Shell_exec php with nohup

I think there are tons of similar posts but I haven't yet found a solution after searching around. Basically, I'm trying to run two scripts in the background. When I run them in the commandline, I see after calling my first script: /usr/bin/nohup…
Rio
  • 14,182
  • 21
  • 67
  • 107
11
votes
8 answers

Unable to run nohup command from jenkins as a background process

UPDATE: Based on below discussion I have edited my answer for more accurate description. I am trying to run a nohup command from jenkins. The full command is nohup java -jar /home/.../jar/server-process-0.35.jar prod >>…
Utsav Gupta
  • 3,785
  • 5
  • 30
  • 52
1 2
3
47 48