Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
wait()ing for a job
- X-seq: zsh-users 18925
- From: meino.cramer@xxxxxx
- To: zsh-users@xxxxxxx
- Subject: wait()ing for a job
- Date: Sat, 5 Jul 2014 07:07:58 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author