I see that I didn't fix all the misuses of the term nice value
so I installed this further patch. I added a NEWS item.
2005-09-09 Paul Eggert [EMAIL PROTECTED]
* NEWS: Document niceness vs nice value.
* configure.ac (utils_cv_func_setpriority): Simplify the tests.
Define HAVE_NICE rather than NICE_PRIORITY (since a niceness is
not a priority); all uses changed.
* src/nice.c (main): Hoist errno=0 outside the ifdef.
* doc/coreutils.texi (nice invocation): Document niceness versus
nice value versus scheduling priority.
--- NEWS29 Aug 2005 21:14:06 - 1.305
+++ NEWS9 Sep 2005 19:57:59 -
@@ -103,6 +103,11 @@ GNU coreutils NEWS
--indicator-style=slash. Use --file-type or
--indicator-style=file-type to get -p's old behavior.
+ nice changes:
+
+Documentation and diagnostics now refer to nicenesses (commonly
+in the range -20...19 rather than nice values (commonly 0...39).
+
nohup changes:
nohup now ignores the umask when creating nohup.out.
@@ -270,15 +275,15 @@ GNU coreutils NEWS
Fixes for nice:
-If it fails to lower the nice value due to lack of permissions,
+If it fails to lower the niceness due to lack of permissions,
it goes ahead and runs the command anyway, as POSIX requires.
-It no longer incorrectly reports an error if the current nice
-value happens to be -1.
+It no longer incorrectly reports an error if the current niceness
+happens to be -1.
-It no longer assumes that nice values range from -20 through 19.
+It no longer assumes that nicenesses range from -20 through 19.
-It now consistently adjusts out-of-range nice values to the
+It now consistently adjusts out-of-range nicenesses to the
closest values in range; formerly it sometimes reported an error.
pathchk no longer accepts trailing options, e.g., pathchk -p foo -b
--- configure.ac23 Aug 2005 16:38:45 - 1.61
+++ configure.ac9 Sep 2005 19:57:59 -
@@ -114,29 +114,24 @@ if test $ac_cv_func_syslog = no; then
done
fi
-AC_MSG_CHECKING(for 3-argument setpriority function)
-AC_CACHE_VAL(utils_cv_func_setpriority,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include sys/time.h
- #include sys/resource.h]], [[setpriority(0, 0, 0);]])],
- [utils_cv_func_setpriority=yes],
- [utils_cv_func_setpriority=no])])
-AC_MSG_RESULT($utils_cv_func_setpriority)
-if test $utils_cv_func_setpriority = yes; then
- OPTIONAL_BIN_PROGS=$OPTIONAL_BIN_PROGS nice\$(EXEEXT)
- MAN=$MAN nice.1
-else
- AC_MSG_CHECKING(for nice function)
- AC_CACHE_VAL(utils_cv_func_nice,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[nice();]])],
- [utils_cv_func_nice=yes],
- [utils_cv_func_nice=no])])
- AC_MSG_RESULT($utils_cv_func_nice)
- if test $utils_cv_func_nice = yes; then
-AC_DEFINE(NICE_PRIORITY, 1, [FIXME])
-OPTIONAL_BIN_PROGS=$OPTIONAL_BIN_PROGS nice\$(EXEEXT)
-MAN=$MAN nice.1
- fi
+AC_CACHE_CHECK([for 3-argument setpriority function],
+ [utils_cv_func_setpriority],
+ [AC_LINK_IFELSE(
+[AC_LANG_PROGRAM(
+ [[#include sys/time.h
+#include sys/resource.h
+ ]],
+ [[setpriority (0, 0, 0);]])],
+[utils_cv_func_setpriority=yes],
+[utils_cv_func_setpriority=no])])
+if test $utils_cv_func_setpriority = no; then
+ AC_CHECK_FUNCS([nice])
fi
+case $utils_cv_func_setpriority,$ac_cv_func_nice in
+*yes*)
+ OPTIONAL_BIN_PROGS=$OPTIONAL_BIN_PROGS nice\$(EXEEXT)
+ MAN=$MAN nice.1;;
+esac
AC_DEFUN([coreutils_DUMMY_1],
[
--- doc/coreutils.texi.~1.277.~ 2005-09-07 22:34:10.0 -0700
+++ doc/coreutils.texi 2005-09-09 13:49:19.0 -0700
@@ -12517,6 +12517,16 @@ enforce more restrictive limits. An att
outside the supported range is treated as an attempt to use the
minimum or maximum supported value.
+A niceness should not be confused with a scheduling priority, which
+lets applications determine the order in which threads are scheduled
+to run. Unlike a priority, a niceness is merely advice to the
+scheduler, which the scheduler is free to ignore. Also, as a point of
+terminology, @acronym{POSIX} defines the behavior of @command{nice} in
+terms of a @dfn{nice value}, which is the nonnegative difference
+between a niceness and the minimum niceness. Though @command{nice}
+conforms to @command{POSIX}, its documentation and diagnostics use the
+term ``niceness'' for compatibility with historical practice.
+
@var{command} must not be a special built-in utility (@pxref{Special
built-in utilities}).
--- src/nice.c 8 Sep 2005 06:52:09 - 1.84
+++ src/nice.c 9 Sep 2005 19:58:04 -
@@ -1,4 +1,4 @@
-/* nice -- run a program with modified nice value
+/* nice -- run a program with modified niceness
Copyright (C) 1990-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify