summaryrefslogtreecommitdiff
path: root/parallel.c
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-02-23 15:44:08 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-02-23 15:44:08 -0500
commit4665e4fdca863b8346ed2cc39304f2c763e183a9 (patch)
tree15fb904027f1eb42f08946c05a0b0dde0a8951fb /parallel.c
parenta1a2b5fe9f8e474c55308637caa3f4852f52b480 (diff)
downloadmoreutils-4665e4fdca863b8346ed2cc39304f2c763e183a9.tar.gz
parallel: Allow a decimal load value to be specified with -l
Diffstat (limited to 'parallel.c')
-rw-r--r--parallel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parallel.c b/parallel.c
index 6bd4665..c3b9d67 100644
--- a/parallel.c
+++ b/parallel.c
@@ -100,7 +100,7 @@ int wait_for_child(int options) {
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);
@@ -132,7 +132,7 @@ int main(int argc, char **argv) {
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);