You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
util: Make files opened via fsbridge::fopen() not inheritable by child processes #36668
Files opened via fsbridge::fopen() are inherited by child processes, such as -*notify or -signer commands.
They should not be, as a child has no business with the node's open files. On POSIX systems this can be achieved with O_CLOEXEC. On Windows, with the N mode flag (_O_NOINHERIT).
On Windows, this manifests as a functional test that passes all its cases and then fails to clean up:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: ‘D:\a\temp\test_runner₿🏃20261026_100424\feature_versionbits_warning_0\node0\regtest\debug.log’
I would like to help contribute to this issue. I have read your comments on adding the O_CLOEXEC (POSIX) and _O_NOINHERIT). And have added the modes in src/util/fs.cpp.
I have tested it in Linux(OpenSUSE distro), but still need to test it in OSX and Windows. But just wanted to check with you to see if the implementation of the PR is headed in the right direction.
Activity
Windows: Open files non-inheritable until bitcoin/bitcoin#36668 is re…
SirECMG commentedon Oct 27, 2026
Hi @hebasto,
I would like to help contribute to this issue. I have read your comments on adding the O_CLOEXEC (POSIX) and _O_NOINHERIT). And have added the modes in src/util/fs.cpp.
I have tested it in Linux(OpenSUSE distro), but still need to test it in OSX and Windows. But just wanted to check with you to see if the implementation of the PR is headed in the right direction.
#36677: link to potential fix