Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dup FD when converting an IO object to a FILE*
@JeffBezanson and I decided that was the best way to go about handling the issue that fdopen wants to take ownership of the file descriptor. In this way the two objects are independent and everything should work in the general case. Also add a close method to Libc.FILE, which can now always be safely called (assuming of course that it isn't closed by the C function it gets passed to). Finally, move RawFD and dup to Libc, since they're part of the C library anyway.
- Loading branch information
Showing
3 changed files
with
24 additions
and
17 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