From: Wichert Akkerman Date: Thu, 26 Jul 2001 11:54:08 +0000 (+0000) Subject: seems glibc has a completely non-standard return value for nice(2), so deal with... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aea1cf18269425d027ede3a727de6aeba71a291d;p=dpkg seems glibc has a completely non-standard return value for nice(2), so deal with that properly now so things also work on non-glibc systems --- diff --git a/ChangeLog b/ChangeLog index 72a851fd..9a284a90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jul 26 13:52:43 CEST 2001 Wichert Akkerman + + * utils/start-stop-daemon.c: seems glibc has a completely non-standard + return value for nice(2), so deal with that properly now so things also + work on non-glibc systems. + Tue Jul 24 19:07:43 CEST 2001 Wichert Akkerman * main/showpkg.c, main/query.h: new files diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index e6f5bed2..6e762867 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -1151,7 +1151,8 @@ main(int argc, char **argv) dup(fd); /* stderr */ } if (nicelevel) { - if (nice(nicelevel)==-1) + errno=0; + if ((nice(nicelevel)==-1) && (errno!=0)) fatal("Unable to alter nice level by %i: %s", nicelevel, strerror(errno)); }