Tagged Questions
4
votes
1answer
150 views
why do background jobs hang depending on the size of the output?
I had some stress-testing scripts that were running in parallel and they would hang after finishing and would wait for a RETURN keystroke to exit. After investigating I discovered that it is not ...
2
votes
1answer
97 views
Can I transfer running process from dead ssh [duplicate]
Possible Duplicate:
How can I disown a running process and associate it to a new screen shell?
I have started (as expected) a long copy process from ssh shell (putty) which died due to ...
2
votes
2answers
42 views
How to supress the display of previous job details?
When I run a process in the background the process ID gets displayed in the command prompt. For example:
$ gvim 1 &
[3] 9584
Now when I run another process the state of the previous one also ...
5
votes
3answers
1k views
How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?
I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits.
The best that I've managed to come up with is this. It ...
2
votes
1answer
481 views
How to recover a backgrounded job from a previous shell? [duplicate]
Possible Duplicate:
How can I disown a running process and associate it to a new screen shell?
I launched a command that lasts a long time.
I had to disconnect so I moved it in the ...
1
vote
3answers
675 views
Bash wait for jobs and limit job count [duplicate]
Possible Duplicate:
Four tasks in parallel… how do I do that?
Suppose a loop invoking a command
grep -v '#' < files.m3u | sed 's/\\\\/\/\//g' | sed 's/\\/\//g' | while read line
...
1
vote
2answers
228 views
Basic job control: stop a job, add a job onto the stack, and `fg`
Job control is probably my favorite thing about Linux. I find myself, often, starting a computationally demanding process that basically renders a computer unusable for up to days at a time, and being ...
0
votes
1answer
376 views
safely killing a background process
I'm writing data to a pipe in a parent process. The parent process creates a background job that reads data from the pipe & write it to the screen & to a log file.
How can I know when to kill ...
4
votes
1answer
829 views
Non-blocking bash command
Let's say I have a bash script with the following:
#!/bin/sh
gedit
rm *.temp
When I execute it using sh ./test.sh, gedit pops-up but the rm part does not run until after I close gedit.
I want the ...
13
votes
5answers
4k views
How can I close a terminal without killing its children (without running `screen` first)?
sometimes I run an app in the gnome-terminal, but then I suddenly have to restart gnome or something. I guess the answer to the question is also useful then I want to disconnect from SSH where ...
3
votes
1answer
274 views
Background task finished notification syntax
Last night, before abandoning my computer for the evening, I started a bunch of compiler jobs so they'd be ready in the morning, using make -f alpha.mak &>alpha.out &. When I came back and ...
1
vote
1answer
587 views
ant script stops, waiting for input when run in background
I'm running an ant (Java build tool) script on CentOS 5.5 that execs another java process. When I run the ant script in the background:
ant -f myfile.xml &> foo.out &
The forked process' ...
64
votes
1answer
10k views
Difference between nohup, disown and &
What is the difference between
$ nohup foo
and
$ foo &
and
$ foo &
$ disown
4
votes
2answers
518 views
How to suspend and resume proccesses
In the bash terminal I can hit Control+Z to suspend any running proccess... then I can type fg to resume the proccess.
Is it possible to suspend a process if I only have it's PID? And if so, what ...