* parallel: Fix to really avoid running new jobs when load is too high.
* parallel: Fix logic error in code handling -l that could make parallel
return a bogus 255 exit code when all jobs succeeded. Closes: #569617
+ * parallel: Allow a decimal load value to be specified with -l
-- Joey Hess <joeyh@debian.org> Sun, 21 Feb 2010 13:16:10 -0500
int main(int argc, char **argv) {
int maxjobs = -1;
int curjobs = 0;
- int maxload = -1;
+ double maxload = -1;
int argsatonce = 1;
int opt;
char **command = calloc(sizeof(char*), argc);
break;
case 'l':
errno = 0;
- maxload = strtoul(optarg, &t, 0);
+ maxload = strtod(optarg, &t);
if (errno != 0 || (t-optarg) != strlen(optarg)) {
fprintf(stderr, "option '%s' is not a number\n",
optarg);