summaryrefslogtreecommitdiffhomepage
path: root/subr/ex_pkg_dispatch.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-05 16:53:38 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-05 16:53:38 +0000
commit44d0b353d360353bd17e5943b7bb051b68c0f278 (patch)
tree2b4a9735b94c58cab4a0e1c86a236a75f0b3cc2e /subr/ex_pkg_dispatch.subr
parent4b9285c0f65773d49514742c2e60755262018496 (diff)
downloadmidipix_build-44d0b353d360353bd17e5943b7bb051b68c0f278.tar.bz2
midipix_build-44d0b353d360353bd17e5943b7bb051b68c0f278.tar.xz
subr/ex_pkg_dispatch.subr:ex_pkg_dispatch(): dispatch ${_njobs_max} jobs prior to entering FIFO loop.
Diffstat (limited to 'subr/ex_pkg_dispatch.subr')
-rw-r--r--subr/ex_pkg_dispatch.subr14
1 files changed, 10 insertions, 4 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 43d3fb60..f56146bf 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -55,10 +55,16 @@ ex_pkg_dispatch() {
while [ ${#} -gt 0 ]; do
_script_rc=0; _njobs=0;
ex_rtl_fileop mkfifo "${_pipe_path}";
- exp_pkg_dispatch "${1}" "${_tgt_name}" \
- "${_restart_at}" "${_dispatch_fn}" \
- "${_stderrout_path}" "${_pipe_path}" \
- _njobs; shift;
+ for _njob in $(seq 1 $((${_njobs_max}-${_njobs}))); do
+ if [ ${#} -eq 0 ]; then
+ break;
+ else
+ exp_pkg_dispatch "${1}" "${_tgt_name}" \
+ "${_restart_at}" "${_dispatch_fn}" \
+ "${_stderrout_path}" "${_pipe_path}" \
+ _njobs; shift;
+ fi;
+ done;
if [ "${_njobs:-0}" -gt 0 ]; then
while read _pipe_msg; do
case "${_pipe_msg%% *}" in