mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 00:00:26 +02:00
Merge bitcoin/bitcoin#32403: test: remove Boost SIGCHLD workaround.
3add6ab9ad
test: remove Boost SIGCHLD workaround. (fanquake) Pull request description: The related code was removed from Boost in2e3bd1025d
. ACKs for top commit: achow101: ACK3add6ab9ad
laanwj: ACK3add6ab9ad
hebasto: ACK3add6ab9ad
, I have reviewed the code and it looks OK. mabu44: ACK3add6ab9ad
Tree-SHA512: a0db2bb4e6a476c920a97183bd807e800d935114ff28f8802373a08b5330df42a9be953e7ea6e3c09f2ed45175f60c26c33bb4e25010269e6e491f12867ba008
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
@@ -1198,11 +1197,6 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
|
||||
fs::path dirname = m_args.GetDataDirBase() / "lock_dir";
|
||||
const fs::path lockname = ".lock";
|
||||
#ifndef WIN32
|
||||
// Revert SIGCHLD to default, otherwise boost.test will catch and fail on
|
||||
// it: there is BOOST_TEST_IGNORE_SIGCHLD but that only works when defined
|
||||
// at build-time of the boost library
|
||||
void (*old_handler)(int) = signal(SIGCHLD, SIG_DFL);
|
||||
|
||||
// Fork another process for testing before creating the lock, so that we
|
||||
// won't fork while holding the lock (which might be undefined, and is not
|
||||
// relevant as test case as that is avoided with -daemonize).
|
||||
@@ -1280,8 +1274,6 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
|
||||
BOOST_CHECK_EQUAL(processstatus, 0);
|
||||
BOOST_CHECK_EQUAL(util::LockDirectory(dirname, lockname, true), util::LockResult::Success);
|
||||
|
||||
// Restore SIGCHLD
|
||||
signal(SIGCHLD, old_handler);
|
||||
BOOST_CHECK_EQUAL(close(fd[1]), 0); // Close our side of the socketpair
|
||||
#endif
|
||||
// Clean up
|
||||
|
Reference in New Issue
Block a user