* Cap sillyness. Closes: #570815
* parallel: Fix exit code handling when commands are specified after --
+ * parallel: Make -j 0 do something reasonable (start all jobs at once).
-- Joey Hess <joeyh@debian.org> Sun, 21 Feb 2010 13:16:10 -0500
getloadavg(&load, 1);
- if ((maxjobs > 0 && curjobs < maxjobs) ||
+ if ((maxjobs == 0 || curjobs < maxjobs) ||
(maxload > 0 && load < maxload)) {
if (argsatonce > arglen - argidx)
argsatonce = arglen - argidx;
curjobs++;
}
- if (maxjobs > 0 && curjobs == maxjobs) {
+ if (maxjobs == 0 || curjobs == maxjobs) {
returncode |= wait_for_child(0);
curjobs--;
}