Skip to main content

Questions tagged [job-control]

Questions about the various ways jobs can be controlled by the shell: suspending, resuming, terminating execution etc.

Filter by
Sorted by
Tagged with
6 votes
2 answers
657 views

$ sleep 1234& $ sleep 12345678& $ %sleep\ 1234 bash: fg: sleep 1234: ambiguous job spec $ jobs [1]- Running sleep 1234 & [2]+ Running sleep 12345678 & ...
Dan Jacobson's user avatar
0 votes
1 answer
72 views

I just rebooted one of my systems for the first time in several months, restarted tmux and my usual set of bash shells for tailing various log files, and noticed that running fg n (i.e. fg followed by ...
cas's user avatar
  • 85.1k
4 votes
1 answer
313 views

Lets define a shell function (here the shell is Bash) and test it $ s () { xterm -e sleep 5 & } $ s [1] 307926 $ [1]+ Done xterm -e sleep 5 $ With my specific meaning of ...
gboffi's user avatar
  • 1,406
0 votes
0 answers
42 views

How to create a new process with the session ID (setsid) of an existing process? I have an idea using GDB which is working partly. But I'm also thankful for other approaches. . There seems to be no ...
kolAflash's user avatar
2 votes
0 answers
85 views

poc: $ for i in $( seq 1 10 ); do echo "begin $i"; sleep 4 ; echo " end $i" ; done begin 1 end 1 begin 2 end 2 begin 3 ## after 1 second, I : ctrl-z ^Z [1]+ Stopped ...
Olivier Dulac's user avatar
2 votes
1 answer
130 views

I am using the following version of the bash: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) When I start some command (e.g. ./hiprogram) directly from the terminal, then bash forks itself,...
Yakog's user avatar
  • 517
0 votes
0 answers
119 views

When running a long-running command in the background over SSH from a non-interactive shell script, I noticed the process continues running on the remote machine without using nohup, disown, or ...
phip1611's user avatar
  • 101
0 votes
1 answer
166 views

I want to run those command in linux jobs, so when I tyep "jobs", I can mannage those jobs, how to do it ( in bash script)
lovespring's user avatar
1 vote
1 answer
106 views

I need to prevent SIGINT (Ctrl-C) from propagating from a subshell to its parent shell functions in Zsh. Here's a minimal example: function sox-record { local output="${1:-$(mktemp).wav}"...
HappyFace's user avatar
  • 1,704
2 votes
1 answer
103 views

I'm writing a shell wrapper script that is supposed to act as a pager (receiving input on stdin and performing output on a tty). This wrapper prepares environment and command lines, then launches two ...
intelfx's user avatar
  • 5,759
0 votes
1 answer
328 views

Note: script refers to the script command, which logs stdin and stdout to files. I was trying to run a script with the script utility to save output for later inspection while preserving text colors ...
GoDaft WithEBK's user avatar
0 votes
2 answers
135 views

This question inspired me to another related question. Imagine that you start % nohup a.sh & and then want b.sh to execute when a.sh is finished (E.g., b.sh will process the output from a.sh. ...
d-b's user avatar
  • 2,077
5 votes
3 answers
1k views

I have the following script: suspense_cleanup () { echo "Suspense clean up..." } int_cleanup () { echo "Int clean up..." exit 0 } trap 'suspense_cleanup' SIGTSTP trap '...
Sebastian Carlos's user avatar
1 vote
2 answers
899 views

As far as I've seen, pressing Ctrl-Z on any terminal multiplexer, or trying to start them in the background, does nothing or crashes. I know that, in a sense, terminal multiplexers are a "...
Sebastian Carlos's user avatar
29 votes
2 answers
6k views

"Yes, and..." is a wonderful rule-of-thumb in improvisational comedy. Not so much in the UNIX world. When I run the admittedly silly yes& command, I cannot interrupt it. The terminal ...
Sebastian Carlos's user avatar

15 30 50 per page
1
2 3 4 5
16