aboutsummaryrefslogtreecommitdiff
path: root/manual/resource.texi
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-06-05 06:21:21 +0000
committerAndreas Jaeger <aj@suse.de>2001-06-05 06:21:21 +0000
commit6a7a8b22f64f780e8749edca9f998ebba6fdef4f (patch)
tree7320f66735aee7c9eae6c76dd21f5315e3e518c0 /manual/resource.texi
parent17827c3a399d597c020b87b786e0413075e72162 (diff)
downloadglibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.zip
glibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.tar.gz
glibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.tar.bz2
Update.
2001-06-05 Andreas Jaeger <aj@suse.de> * manual/libm-err-tab.pl (parse_ulps): Fix typo. 2001-06-04 H.J. Lu <hjl@gnu.org> * sysdeps/alpha/elf/start.S: Add .type for the entry point. * sysdeps/arm/elf/start.S: Likewise. * sysdeps/hppa/elf/start.S: Likewise. * sysdeps/i386/elf/start.S: Likewise. * sysdeps/m68k/elf/start.S: Likewise. * sysdeps/mips/elf/start.S: Likewise. * sysdeps/ia64/elf/start.S: Likewise. * sysdeps/sh/elf/start.S: Likewise. * sysdeps/s390/s390-32/elf/start.S: Likewise. * sysdeps/s390/s390-64/elf/start.S: Likewise. * sysdeps/cris/elf/start.S: Likewise. 2001-06-04 Bruce Mitchener <bruce@cubik.org> * manual/resource.texi: Correct setpriority/nice documentation. * sysdeps/unix/nice.c: Correct nice() implementation.
Diffstat (limited to 'manual/resource.texi')
-rw-r--r--manual/resource.texi15
1 files changed, 11 insertions, 4 deletions
diff --git a/manual/resource.texi b/manual/resource.texi
index da30d7c..3beb939 100644
--- a/manual/resource.texi
+++ b/manual/resource.texi
@@ -1170,7 +1170,7 @@ afterward as the criterion for failure.
Set the nice value of a set of processes to @var{niceval}; @var{class}
and @var{id} specify which ones (see below).
-The return value is the nice value on success, and @code{-1} on
+The return value is @code{0} on success, and @code{-1} on
failure. The following @code{errno} error condition are possible for
this function:
@@ -1225,7 +1225,10 @@ process group, or its owner (real uid), according to @var{class}.
@comment BSD
@deftypefun int nice (int @var{increment})
Increment the nice value of the calling process by @var{increment}.
-The return value is the same as for @code{setpriority}.
+The return value is the new nice value on success, and @code{-1} on
+failure. In the case of failure, @code{errno} will be set to the
+same values as for @code{setpriority}.
+
Here is an equivalent definition of @code{nice}:
@@ -1233,8 +1236,12 @@ Here is an equivalent definition of @code{nice}:
int
nice (int increment)
@{
- int old = getpriority (PRIO_PROCESS, 0);
- return setpriority (PRIO_PROCESS, 0, old + increment);
+ int result, old = getpriority (PRIO_PROCESS, 0);
+ result = setpriority (PRIO_PROCESS, 0, old + increment);
+ if (result != -1)
+ return old + increment;
+ else
+ return -1;
@}
@end smallexample
@end deftypefun