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: [PATCH] Write errors to stdout and not stderr in nptl/tst-setuid3.c


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


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