zsh-users
 help / color / mirror / code / Atom feed
* wait()ing for a job
@ 2014-07-05  5:07 meino.cramer
  2014-07-05 17:32 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: meino.cramer @ 2014-07-05  5:07 UTC (permalink / raw)
  To: zsh-users

Hi,

I want to write a zsh-script to start several rsync-jobs in background
and 'wait' for each of them to end. I need the return code of each
of them.

>From the zsh manpage about the wait builtin:

      wait [ job ... ]
              Wait for the specified jobs or processes.  If job is not given then  all  currently
              active  child processes are waited for.  Each job can be either a job specification
              or the process ID of a job in the job table.  The exit status from this command  is
              that of the job waited for.

The last sentence confuses me:
'wait' seems to be able to wait not only for one but for several jobs.
The last sentence says that the return code of 'wait' is that of
*that* (not "those") job waited for.

I need all return codes -- if one rsync fails, I got a problem.

What is it, what I don't correctly understand from the manpage -- what
does wait according to the return codes of several jobs?

Best regards,
mcc





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-05 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05  5:07 wait()ing for a job meino.cramer
2014-07-05 17:32 ` Bart Schaefer
2014-07-05 19:56   ` Bart Schaefer

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).