I find logic around forking child processes always a bit confusing, hopefully these comments can make it a bit easier for a future reader.
doc: Add comments for socket descriptor handling when forking #108
pull TheCharlatan wants to merge 1 commits into bitcoin-core:master from TheCharlatan:forkDocs changing 1 files +2 −0-
TheCharlatan commented at 8:02 AM on August 21, 2024: collaborator
-
doc: Add comments for socket descriptor handling when forking b56bf218c7
-
ryanofsky commented at 1:44 PM on August 21, 2024: collaborator
Code review ACK b56bf218c7d5e2666dbc6b85900af113181260dc
Separately, it looks like there is also a potential leak in that function because both socketpair descriptors will be leaked if fork() fails. But probably this is not a serious issue because if fork() fails, something is already very wrong and the process might be to exit anyway.
- ryanofsky merged this on Aug 21, 2024
- ryanofsky closed this on Aug 21, 2024
- ryanofsky referenced this in commit 357a6bc97b on Sep 9, 2024
- ryanofsky referenced this in commit 210700f319 on Sep 10, 2024
- ryanofsky referenced this in commit 587c019b38 on Sep 10, 2024
- Sjors referenced this in commit dbd15b6b1f on Sep 10, 2024
- Sjors referenced this in commit 979b94a90d on Sep 11, 2024
- Sjors referenced this in commit a438912388 on Sep 11, 2024
- ryanofsky referenced this in commit 3d954627d9 on Sep 17, 2024
- ryanofsky referenced this in commit 2348596587 on Sep 17, 2024
- ryanofsky referenced this in commit 8c2dd0426a on Sep 19, 2024
- ryanofsky referenced this in commit 72689b19db on Sep 19, 2024
- Sjors referenced this in commit 7c99b034c1 on Sep 19, 2024
- Sjors referenced this in commit 3780057949 on Sep 19, 2024
- Sjors referenced this in commit 94aa5d0b3d on Sep 20, 2024
- ryanofsky referenced this in commit 287eafc66b on Sep 24, 2024
- ryanofsky referenced this in commit 070e6a32d5 on Sep 24, 2024
- m3dwards referenced this in commit 426ecb8483 on Oct 3, 2024
- janus referenced this in commit 2864e7638f on Jan 19, 2025
- bitcoin-core locked this on Aug 21, 2025
Contributors