[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Waiting for _any_ background process to terminate.

From: Alan Mackenzie
Subject: Waiting for _any_ background process to terminate.
Date: Mon, 11 Feb 2013 18:59:35 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, bug-bash.

>From a bash script, I'd like to be able to start several subtasks and
react to any one of them completing.  I don't think I can do this with
the current bash.  The `wait' function either waits on a specified subtask
to finish, or for _all_ subtasks to finish.

Am I mistaken about this perceived lack?  If not, would it be possible
to add this functionality into bash?

The sort of thing I want to do with this is to perform lots of gzippings
in separate tasks, so as to spread them amongst the cores of my 4-core
processor, always keeping 4 subtasks on the go at any time.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]