Questions tagged [background-process]

On POSIX systems a background-process is created in a shell by either adding an ampersand symbol after a command (e.g. ./script.sh &) or by pressing CTRL+Z while the command is being executed. The command will then run independently from the shell but will still write stdout and stderr output to the shell from where it has been started. It can only be stopped with the kill command.

89 questions
60
votes
6 answers

How can I run mongod in the background on unix (mac osx)?

I would like to run mongod in the background as an always present sort of thing. What would be the best way to do this? Kind of like the way I can run MySQL on startup and it's just always there running in the background. Maybe it's just some bash…
rmontgomery429
  • 749
  • 1
  • 8
  • 8
32
votes
4 answers

Writing to stdin of background process

I'm on an Ubuntu 10.04 box, and started a server in the background (myserver &) over ssh. It's been running fine, but I need a way to get at the server's stdin, as the only way to control the server is through this method. Is there some way to get…
tajmorton
  • 435
  • 1
  • 4
  • 5
26
votes
1 answer

How to send running process to background?

Once in a while I will issue a command that takes longer than I had thought it would (archiving a directory or something). How do I escape the process, send it to the background, and return to the prompt? I think there's a keyboard shortcut, but I…
doub1ejack
  • 537
  • 1
  • 6
  • 12
21
votes
3 answers

How do I start a process in suspended state under Linux?

Practically, I need a process which behaves, as if I had pressed Ctrl+Z just after it started. Hopefully, it is possible to do such thing using a shell script. (Also, knowing the resulting PID would be great, so I could continue the process…
java.is.for.desktop
  • 889
  • 3
  • 9
  • 15
13
votes
4 answers

There is any way to run processes in the background in Windows? nohup equivalent for windows

nohup runs a process in the background. There is any equivalent for Windows?
Jader Dias
  • 4,625
  • 18
  • 48
  • 50
11
votes
2 answers

How to schedule a task to call a URL

I have an MVC app. I have a controller that when called runs a background process to query Active Directory and updates the database. http://myapp/BackgroundTask/Run I want to run this on a schedule (daily) without opening a browser. I see that…
7
votes
4 answers

Bash: Put a job in the background and then tail the log

How do you make the escaping work so that the & is actually running the first command in the background? # foo param1 param2 >> run.out &; tail -f run.out
Paul Tarjan
  • 559
  • 3
  • 8
  • 17
7
votes
1 answer

Job Control/background process (using ampersand) in .ebextensions config commands

Take for example the following .config file in .ebextensions/ container_commands: 000_run_queue_daemon: command: "nohup php artisan queue:work --daemon &" test: "ps -ef | grep artisan | grep -v grep > /dev/null || echo 1" If the daemon…
7
votes
2 answers

Start Sinatra app in the background with stdout and stderr redirected (append) to a file

I have a Sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, how do I run it in background and redirect stdout and stderr to a log file? On a restart, I want to preserve the previous logs so…
letronje
  • 429
  • 1
  • 6
  • 16
6
votes
1 answer

nohup vs screen vs ? for manually starting daemon processes

When I need to start a background process on a low-importance server, I tend to use nohup: nohup ./server.sh & Most colleagues seem to prefer screen: screen -D -R mydaemon ./mydaemon.sh ^A ^D Are there any major differences in the effect of these…
Steve Bennett
  • 5,539
  • 12
  • 45
  • 57
6
votes
5 answers

Tools to run a background process command line in windows?

In linux we just need to append a & and that's all. What for windows?
vps
  • 1,187
  • 3
  • 12
  • 12
5
votes
6 answers

Running Subversion post-commit hook as a background process

Because currently our Subversion post-commit hooks take way too long to execute I've been trying to speed things up. I've been thinking about executing the actual hooks as a background process, so that the svn commit would complete before the actual…
Rene Saarsoo
  • 283
  • 3
  • 6
5
votes
2 answers

Dynamic number of supervisord controlled processes

I am using supervisord's [program:x] to keep my background queue runners up and running. The amount of numprocs is set to a static number, but now I am looking for a solution to dynamically adjust the process count depending on the workload of the…
Ville Mattila
  • 459
  • 7
  • 12
5
votes
5 answers

Running python app in the background on linux

Weird question here, but I'm playing with a python chat server/client combo on my Linux server. Currently, if I do this: $: cd /path/to/chat/server $: sudo python ChatServer_Listen.py This starts the python app run loop and the server listens for…
Daddy
  • 237
  • 1
  • 4
  • 10
5
votes
2 answers

Shell background processes: what do characters in termination message mean?

I had three background processes, and here's what I've got: [1] Done zcat jan.txt.gz > j [2]- Done zcat feb.txt.gz > f [3]+ Done zcat mar.txt.gz > m What do those " ", "+", "-" mean?…
alamar
  • 199
  • 5
1
2 3 4 5 6