aboutsummaryrefslogtreecommitdiff
path: root/support/delayed_exit.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-12-31 12:20:49 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-12-31 18:51:15 +0100
commit039c5a05cc905e3d48392e7ea9f85e339b7c068b (patch)
tree2d69efafb74a99d94b13b98eaab09d9e1d0e505c /support/delayed_exit.c
parent5707a64d9462001f9c7c2e02d3f52cf8b0181658 (diff)
downloadglibc-039c5a05cc905e3d48392e7ea9f85e339b7c068b.tar
glibc-039c5a05cc905e3d48392e7ea9f85e339b7c068b.tar.gz
glibc-039c5a05cc905e3d48392e7ea9f85e339b7c068b.tar.bz2
glibc-039c5a05cc905e3d48392e7ea9f85e339b7c068b.zip
support: Use support_record_failure consistently
This causes more test programs to link in the support_record_failure function, which triggers an early call to mmap from an ELF constructor, but this should not have side effects intefering with the functionality actually under test (unlike, say, a call to malloc).
Diffstat (limited to 'support/delayed_exit.c')
-rw-r--r--support/delayed_exit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/support/delayed_exit.c b/support/delayed_exit.c
index d5b2e10927..1384f5cc34 100644
--- a/support/delayed_exit.c
+++ b/support/delayed_exit.c
@@ -22,6 +22,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#include <support/check.h>
#include <time.h>
static void *
@@ -31,10 +32,7 @@ delayed_exit_thread (void *seconds_as_ptr)
struct timespec delay = { seconds, 0 };
struct timespec remaining = { 0 };
if (nanosleep (&delay, &remaining) != 0)
- {
- printf ("error: nanosleep: %m\n");
- exit (1);
- }
+ FAIL_EXIT1 ("nanosleep: %m");
/* Exit the process sucessfully. */
exit (0);
return NULL;