From a10ca2ee137bf3446116a61f42d6a350705254fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 2 May 2014 17:02:37 +0100 Subject: [PATCH] check: use _exit() instead of exit() in fail_unless() so we exit immediately exit() will call atexit handlers, which may try to clean up things or wait for things to get cleaned up, which we don't want or need. We just want to stop and let the parent know about the failure as quickly as possible in case fork() is used. Fixes timeouts on assert failures in checks where an exit handler waits for things to stop, but they don't stop because they haven't been shut down, and they haven't been shut down because there's no simple way to do so on failures. http://sourceforge.net/p/check/patches/50/ --- libs/gst/check/libcheck/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/check/libcheck/check.c b/libs/gst/check/libcheck/check.c index 9aba434..2b7f481 100644 --- a/libs/gst/check/libcheck/check.c +++ b/libs/gst/check/libcheck/check.c @@ -248,7 +248,7 @@ _fail_unless (int result, const char *file, int line, const char *expr, ...) send_failure_info (buf); if (cur_fork_status () == CK_FORK) { #ifdef _POSIX_VERSION - exit (1); + _exit (1); #endif /* _POSIX_VERSION */ } } -- 2.7.4