zsh-users
 help / color / mirror / code / Atom feed
From: Jason Price <jprice@cyberbuzz.gatech.edu>
To: zsh-users@sunsite.dk
Subject: Scripting subprocesses and timed waits.
Date: Wed, 12 Jan 2005 09:56:14 -0500	[thread overview]
Message-ID: <20050112095614.A16221@redfish.gatech.edu> (raw)

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


             reply	other threads:[~2005-01-12 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12 14:56 Jason Price [this message]
2005-01-12 17:49 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050112095614.A16221@redfish.gatech.edu \
    --to=jprice@cyberbuzz.gatech.edu \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).