multijob_post_fork: return child status
authorZac Medico <zmedico@gentoo.org>
Mon, 14 May 2012 08:00:29 +0000 (01:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 May 2012 08:00:29 +0000 (01:00 -0700)
bin/helper-functions.sh

index 1c355e2477561d1fc8f415886e7e53dc947747d4..37f0b1337d8ddd9d542681c4f5d2fa07378d9a1f 100644 (file)
@@ -54,9 +54,11 @@ multijob_finish() {
 }
 
 multijob_post_fork() {
+       local ret=0
        : $(( ++mj_num_jobs ))
        if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]] ; then
                multijob_finish_one
+               : $(( ret |= $? ))
        fi
-       return 0
+       return ${ret}
 }