Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/renice Deal with a current priority of -1; from Taka...



details:   https://anonhg.NetBSD.org/src/rev/03f7dd2b3b3a
branches:  trunk
changeset: 496426:03f7dd2b3b3a
user:      kleink <kleink%NetBSD.org@localhost>
date:      Wed Aug 23 07:01:58 2000 +0000

description:
Deal with a current priority of -1; from Takahiro Kambe in PR bin/10227.

diffstat:

 usr.bin/renice/renice.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r e02fdde3888c -r 03f7dd2b3b3a usr.bin/renice/renice.c
--- a/usr.bin/renice/renice.c   Tue Aug 22 21:46:48 2000 +0000
+++ b/usr.bin/renice/renice.c   Wed Aug 23 07:01:58 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: renice.c,v 1.7 2000/07/03 02:51:33 matt Exp $  */
+/*     $NetBSD: renice.c,v 1.8 2000/08/23 07:01:58 kleink Exp $        */
 
 /*
  * Copyright (c) 1983, 1989, 1993
@@ -41,7 +41,7 @@
 
 #ifndef lint
 /*static char sccsid[] = "from: @(#)renice.c   8.1 (Berkeley) 6/9/93";*/
-__RCSID("$NetBSD: renice.c,v 1.7 2000/07/03 02:51:33 matt Exp $");
+__RCSID("$NetBSD: renice.c,v 1.8 2000/08/23 07:01:58 kleink Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -149,7 +149,8 @@
 {
        int oldprio;
 
-       if ((oldprio = getpriority(which, who)) == -1) {
+       errno = 0;
+       if ((oldprio = getpriority(which, who)) == -1 && errno != 0) {
                warn("%d: getpriority", who);
                return (1);
        }



Home | Main Index | Thread Index | Old Index