]> err.no Git - dpkg/commitdiff
seems glibc has a completely non-standard return value for nice(2), so deal with...
authorWichert Akkerman <wakkerma@debian.org>
Thu, 26 Jul 2001 11:54:08 +0000 (11:54 +0000)
committerWichert Akkerman <wakkerma@debian.org>
Thu, 26 Jul 2001 11:54:08 +0000 (11:54 +0000)
ChangeLog
utils/start-stop-daemon.c

index 72a851fd988602783d5e2dad762b409d3b51a67a..9a284a90a4f042cb15c157c36651d59173282a52 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jul 26 13:52:43 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
+
+  * 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 <wakkerma@debian.org>
 
   * main/showpkg.c, main/query.h: new files
index e6f5bed22279dc1071594e959ee6f30cc7cd592f..6e76286736a4d903300532e7c0bb72be63e4dd11 100644 (file)
@@ -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));
        }