mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 20:20:00 +01:00
init: only use pipe2 if availabile, check in configure
This commit is contained in:
@@ -32,7 +32,7 @@ static int g_shutdown_pipe[2] = {-1, -1};
|
||||
bool InitShutdownState()
|
||||
{
|
||||
#ifndef WIN32
|
||||
#if HAVE_O_CLOEXEC
|
||||
#if HAVE_O_CLOEXEC && HAVE_DECL_PIPE2
|
||||
// If we can, make sure that the file descriptors are closed on exec()
|
||||
// to prevent interference.
|
||||
if (pipe2(g_shutdown_pipe, O_CLOEXEC) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user