From 039c5a05cc905e3d48392e7ea9f85e339b7c068b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 31 Dec 2016 12:20:49 +0100 Subject: 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). --- support/delayed_exit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'support/delayed_exit.c') diff --git a/support/delayed_exit.c b/support/delayed_exit.c index d5b2e10..1384f5c 100644 --- a/support/delayed_exit.c +++ b/support/delayed_exit.c @@ -22,6 +22,7 @@ #include #include #include +#include #include 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; -- cgit v1.1