Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Scripting subprocesses and timed waits.



I have a possibly long running expect script that goes off and does stuff.
Sometimes it takes a long time, and sometimes it will never return at all.

I'd like to find a way to fire off several of these, and notice when each
finishes.  If they don't finish after x seconds, just kill those attempts
and move on.

Ideally I'd like to fire off each of these scripts into the background,
if they all finish quickly, move on.  If one or more take more than the
full time I give them, kill them.

Is there a clever zsh way to do this?  I've noticed coprocesses in the past
and in the manual, but I haven't figured out how to control it sufficiently
for this usage.

Thanks;
Jason



Messages sorted by: Reverse Date, Date, Thread, Author