Various fixes, add renice command.

This commit adds the renice command and its man page,
it also introduces some fixes:
* Makes nice command more solid, it also makes it respect POSIX return values.
* Fixes estrtol, which produced a misleading error on out of range errors.
* Fixes chgrp.1 NAME section.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
Lorenzo Cogotti
2013-06-11 20:33:52 +02:00
committed by Christoph Lohmann
parent c3b771d682
commit 75c97de593
6 changed files with 245 additions and 23 deletions

View File

@@ -13,13 +13,14 @@ estrtol(const char *s, int base)
errno = 0;
n = strtol(s, &end, base);
if(*end != '\0' || errno != 0) {
if(base == 0) {
if(*end != '\0') {
if(base == 0)
eprintf("%s: not an integer\n", s);
} else {
else
eprintf("%s: not a base %d integer\n", s, base);
}
}
if(errno != 0)
eprintf("%s:", s);
return n;
}