-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't attach finalizers to CommunicationHandles
We are now careful to not attach any Handle finalizers when creating pipes for inter-process communication on Unix systems. Instead, the handles are closed manually. The finalizers were causing problems in situations such as the following: - the parent creates a new pipe, e.g. pipe2([7,8]), - the parent spawns a child process, and lets FD 8 be inherited by the child, - the parent closes FD 8 (as it should), - the parent opens FD 8 for some other purpose, e.g. for writing to a file, - the finalizer for the Handle wrapping FD 8 runs, closing FD 8, even though it is now in use for a completely different purpose. This commit does not include a test, as the above bug is a bit difficult to trigger.
- Loading branch information
Showing
5 changed files
with
99 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters