This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix BZ #18086 (nice resets errno to 0)


On Sun, Aug 9, 2015 at 7:19 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 09 Aug 2015 16:28, Paul Pluzhnikov wrote:
>> +      printf ("FAIL: errno = %d != EBADF\n", errno);
>
> i often find error messages like this hard to parse.  explicit is better:
>         printf ("FAIL: errno = %i, but wanted EBADF (%i)\n", errno, EBADF);
>
>> @@ -47,5 +45,7 @@ nice (int incr)
>>       errno = EPERM;
>
> not really related, but shouldn't this use __set_errno ?

That would be logical.

Revised patch attached.

2015-08-09  Paul Pluzhnikov  <ppluzhnikov@google.com>

        [BZ #18086]
        * sysdeps/posix/nice.c (nice): Restore old errno.
        * posix/tst-nice.c (do_test): Add test for BZ #18086.

-- 
Paul Pluzhnikov

Attachment: bz18086-20150809a.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]