HomePhabricator

[sanitizer_common] Close superfluous file descriptors in spawned process

Authored by yln on Aug 27 2019, 3:12 PM.

Description

[sanitizer_common] Close superfluous file descriptors in spawned process

Use attribute flag POSIX_SPAWN_CLOEXEC_DEFAULT in the call to
posix_spawn.

If this flag is set, then only file descriptors explicitly described by
the file_actions argument are available in the spawned process; all of
the other file descriptors are automatically closed in the spawned
process.

POSIX_SPAWN_CLOEXEC_DEFAULT is an Apple-specific extension.

llvm-svn: 370121

Details

Committed
ylnAug 27 2019, 3:12 PM
Parents
rG50c094a3685e: [dotest] Remove check for LLDB_TESTSUITE_FORCE_FINISH
Branches
Unknown
Tags
Unknown