Description[Mac] Fix ProcessUtilTest.FDRemapping for 10.9 and later.
OSX 10.9 introduced a kernel facility which allows tagging file
descriptors to prevent various operations unless the caller knows the
key. libdispatch uses this facility to tag a file descriptor against
close() or dup(), and this test does both. Unfortunately, the failure
case is to raise a kernel exception and hang the child process rather
than return an error code.
This change addresses this by attempting to set a guard. If successful,
the guard is removed and the caller can close the file descriptor as
normal. If unsuccessful, either the file descriptor is not valid, or it
is guarded and cannot be closed. Either way, it is skipped. The test
still succeeds by counting the file descriptors which can be closed.
BUG=338157
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286037
Patch Set 1 #
Total comments: 8
Patch Set 2 : Responses to #2 #Messages
Total messages: 7 (0 generated)
|