about summary refs log tree commit diff
path: root/sysdeps/unix
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 /sysdeps/unix
parent17827c3a399d597c020b87b786e0413075e72162 (diff)
downloadglibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.tar.gz
glibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.tar.xz
glibc-6a7a8b22f64f780e8749edca9f998ebba6fdef4f.zip
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 'sysdeps/unix')
-rw-r--r--sysdeps/unix/nice.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c
index ffde93f3c2..17d07376bc 100644
--- a/sysdeps/unix/nice.c
+++ b/sysdeps/unix/nice.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +23,11 @@
 /* Increment the scheduling priority of the calling process by INCR.
    The superuser may use a negative INCR to decrement the priority.  */
 int
-nice (incr)
-     int incr;
+nice (int incr)
 {
   int save;
   int prio;
+  int result;
 
   /* -1 is a valid priority, so we use errno to check for an error.  */
   save = errno;
@@ -41,5 +41,10 @@ nice (incr)
 	__set_errno (save);
     }
 
-  return setpriority (PRIO_PROCESS, 0, prio + incr);
+  result = setpriority (PRIO_PROCESS, 0, prio + incr);
+  if (result != -1)
+    return prio + incr;
+  else
+    return -1;
+
 }