This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Write errors to stdout and not stderr in nptl/tst-setuid3.c
- From: Florian Weimer <fweimer at redhat dot com>
- To: Arjun Shankar <arjun dot is at lostca dot se>, libc-alpha at sourceware dot org
- Date: Fri, 19 Sep 2014 06:49:33 +0200
- Subject: Re: [PATCH] Write errors to stdout and not stderr in nptl/tst-setuid3.c
- Authentication-results: sourceware.org; auth=none
- References: <20140918231600 dot 642a0c3a at zion>
On 09/18/2014 11:16 PM, Arjun Shankar wrote:
+ printf ("FAIL: " fmt ": %s\n", __VA_ARGS__, strerror (errno)); \
Use “%m” because it is thread-safe.
Alternatively, you could just use dup2 to alias the file descriptors. I
wonder why we don't do this in general.
--
Florian Weimer / Red Hat Product Security