2 //===----------------------------------------------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 // MODULES_DEFINES: _LIBCPP_DEBUG=0
13 // Test that the default debug handler aborts the program.
15 #define _LIBCPP_DEBUG 0
21 void signal_handler(int signal)
23 if (signal == SIGABRT)
24 std::_Exit(EXIT_SUCCESS);
25 std::_Exit(EXIT_FAILURE);
30 if (std::signal(SIGABRT, signal_handler) != SIG_ERR)
31 _LIBCPP_ASSERT(false, "foo");