Questions tagged [wait]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
3answers
2k views

sleep, wait and Ctrl+C propagation

If I have the following shell script sleep 30s And I hit Ctrl+C when the shell script is running, the sleep dies with it. If I have the following shell script sleep 30s & wait And I hit Ctrl+...
12
votes
2answers
35k views

Run commands in parallel and wait for one group of commands to finish before starting the next

I have script including multiple commands. How can I group commands to run together ( I want to make several groups of commands. Within each group, the commands should run in parallel (at the same ...
3
votes
2answers
136 views

Regain ability to use ^C to close backgrounded then (effectively) foregrounded processes

In the interactive console, pressing ^C on zenity --info & fg closes the Zenity window. One can only use zenity --info & wait in a script. But ^C doesn't close the Zenity window in this case. ...
0
votes
2answers
85 views

`wait` for processes started in a for loop, but not others started earlier

Suppose I have several running background tasks, but now I want to run two more background tasks, but wait only for the last two. For example: # long running commands sleep 60 & sleep 60 & # ...
0
votes
1answer
98 views

How can I make `enscript` block till the printer finishes its job?

The following command will create a pdf file under ~/PDF/: enscript -B -P PDF bloom.c I want to move the output pdf file here ...
0
votes
2answers
488 views

Use waitpid for child having groupid 1

I searched a lot but didn't find a solution. So it can be silly question. The format of waitpid is pid_t waitpid (pid_t pid, int *status, int options) The pid parameter specifies exactly which ...