diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-08-11 23:40:00 -0700 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-08-11 23:40:00 -0700 |
commit | 84895dca70f972df3842fb88f7b33b5d695cc599 (patch) | |
tree | ade512ca77f27f09e58435878cec1c640dfaed88 /sysdeps/posix | |
parent | 5011051da35a91577d262040791cbe5a868cffbd (diff) | |
download | glibc-84895dca70f972df3842fb88f7b33b5d695cc599.tar.gz glibc-84895dca70f972df3842fb88f7b33b5d695cc599.tar.xz glibc-84895dca70f972df3842fb88f7b33b5d695cc599.zip |
Fix BZ #18086 -- nice resets errno to 0.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/nice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/posix/nice.c b/sysdeps/posix/nice.c index 42bb99b7e1..8f6daaffbf 100644 --- a/sysdeps/posix/nice.c +++ b/sysdeps/posix/nice.c @@ -36,16 +36,16 @@ nice (int incr) { if (errno != 0) return -1; - else - __set_errno (save); } result = __setpriority (PRIO_PROCESS, 0, prio + incr); if (result == -1) { if (errno == EACCES) - errno = EPERM; + __set_errno (EPERM); return -1; } + + __set_errno (save); return __getpriority (PRIO_PROCESS, 0); } |