The job-control tag has no wiki summary.
1
vote
1answer
22 views
qsub -hold_jid -afterok loop not starting
I am trying to run a series of jobs submitted to the cluster, one after the other, by suplpying the following .sh script:
Annotation_Loop.sh :
#!/bin/bash
job=`qsub run_IntersectBed_1.sh 0`
for i ...
0
votes
1answer
51 views
linux - Play sound on login?
I've installed Gentoo without a GUI and have appended aplay /usr/shar/sounds/startup3.wav &> /dev/null & to my /etc/bash/bashrc file. This works just fine in playing the sound file, but ...
1
vote
1answer
67 views
How can I get bash-like job control in zsh?
I want to configure zsh so that its job control behaves more like (I think) bash does by default. In particular:
When I start a background job, it is by default owned by the shell and can be ...
0
votes
1answer
76 views
How to start a job in the stopped state?
In bash, how can I initiate a job in a stopped state, as if I started it normally and then immediately pressed Ctrl-Z?
Or as if I had sent SIGSTOP to the process immediately, but without giving the ...
1
vote
1answer
115 views
What might cause cron jobs to occasionally not run or complete?
In my crontab, I have set MAILTO and a bunch of cron jobs (5-10 jobs).
These cron jobs usually run fine and I get emails for them. Most of these jobs consistently run as expected. Emails and ...
0
votes
1answer
257 views
Execute background program in bash without job control
I often execute GUI programs, such as firefox and evince from shell. If I type "firefox &", firefox is considered as a bash job, so "fg" will bring it to foreground and "hang" the shell. This ...
0
votes
4answers
65 views
Re-use existing jobs when opening files
The question is best given by examples:
vim example.txt #Opens Vim on new or existing file
Ctrl+Z
vim someother.txt
Ctrl+Z
vim example.txt #Auto-runs `fg 1` since example.txt is already open
...
1
vote
1answer
123 views
How to suspend a sourced script in bash?
When I run a process in Bash, I can suspend it with Ctrl-Z, but that does not seem to work for sourced scripts (. foo.sh). Is there a way to suspend such scripts?
0
votes
2answers
278 views
How to foreground a job from another session
As root, is there a way to foreground (fg) a job within a root session that is in the foreground of another root session? If the job in the other session has to be put in the background (using bg) ...
1
vote
2answers
135 views
Can the interactivity of a process be determined programmatically?
Is it possible to determine whether or not a given running process is interactive or merely daemon-like (i.e. an actual daemon, or a tail -f, or similar) using scripting or any other language?
If so, ...
0
votes
1answer
99 views
How can you determine when a background task was started?
When surveying the output of jobs in bash, you'll often get a list like the following:
[root@csx-tzg-sac-01 ~]# jobs
[2] Running ( sleep 600 && ls -lh ~ossadmin/*.iso ) ...
0
votes
1answer
140 views
Force a backgrounded complex task to fg itself
I will often run a simple monitoring task like the following:
(sleep 600 && ls -lh /path/to/files)&
Is it possible to have the process de-background itself part way in? For example, to ...
2
votes
2answers
564 views
List job ids (instead process ids)
The shell command jobs supports a -p option to just get the list of process ids. Is there an easy way to get just a list of job ids? (I know there is, but I am not really a shell guy (yet)).
This ...
0
votes
1answer
101 views
Make background jobs available in parent shell
Sometimes I start several processes by using another script (in my case Ruby). I call this script from a terminal running bash. I would like to start those processes in the script in the background ...
6
votes
1answer
3k views
Continue a “ctrl-z”-ed job in background
Is it possible to continue a stopped background job in background?
I have a process running, I used ctrl-z to stop it and return to bash. If I want to continue it, there's fg command available but ...
0
votes
1answer
112 views
How to deal with job that stop and cannot continue unless made foreground?
Recent example: mountlo (using UML):
vi@vi-notebook:~/b$ mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other&
[1] 32561
vi@vi-notebook:~/b$ Checking that ptrace can ...
5
votes
2answers
3k views
Put a task to the background with bash
I know that you can start a background job with Bash doing foo &. However, the best way I know to put a foreground job to the background is to do Ctrl+z to pause it then bg 1 to resume it in the ...
4
votes
1answer
1k views
Socat and rich terminals (with Ctrl+C/Ctrl+Z/Ctrl+D propagation)
socat - exec:'bash -li',pty,stderr,ctty -> bash: no job control in this shell
What options should I use to get fully fledged shell as I get with ssh/sshd?
I want to be able to connect the shell to ...
