Fix two errors with dup2.
Fixing incorrect handling of out of range descriptors passed as newfd to dup2. Fixing incorrect free descriptor management when using dup2 on a previously allocated descriptor value. Replacing a heap with a std::set, to allow descriptor deletion from the free set in O(lg n). Dropping impossible case where dup2ing a null handle. TEST=Added two nacl_io_tests. BUG=None R=binji@chromium.org Review URL: https://codereview.chromium.org/849743002 Cr-Commit-Position: refs/heads/master@{#311355}
Showing
Please register or sign in to comment