File::dupCloseOnExec()
Summary: Close-on-exec is an important feature to avoid leaking file descriptors to spawned processes. This diff adds `File::dupCloseOnExec()` function which is equivalent to `File::dup` function, but sets close-on-exec flag where supported (i. e. everywhere except Windows). Practically most users want to have `closeOnExec = true` by default, but we need to preserve backwards compatibility, thus this diff leaves `dup` function as is. Reviewed By: yfeldblum Differential Revision: D27495214 fbshipit-source-id: 540deb2bc6c8fec626a0120bc20c345950dc8af7
Showing
Please register or sign in to comment