Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libnative: process spawning should not close inherited file descriptors
* The caller should be responsible for cleaning up file descriptors * If a caller safely creates a file descriptor (via native::io::file::open) the returned structure (FileDesc) will try to clean up the file, failing in the process and writing error messages to the screen. * This should not happen as the caller has no public interface for telling the FileDesc structure to NOT free the underlying fd. * Alternatively, if another file is opened under the same fd held by the FileDesc structure returned by native::io::file::open, it will close the wrong file upon destruction.
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 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
3fe0ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at https://github.com/ipetkov/rust/commit/3fe0ba9afc7504ec01a778d8d72bd0b72fd013e1
3fe0ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging ipetkov/rust/cmd-fd-fix-retry = 3fe0ba9 into auto
3fe0ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ipetkov/rust/cmd-fd-fix-retry = 3fe0ba9 merged ok, testing candidate = 9d55421
3fe0ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/801
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/801
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/800
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/801
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/797
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/798
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/797
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/803
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/798
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/797
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/800
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/798
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/798
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/799
3fe0ba9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 9d55421