[PATCH] D27239: [sanitizer] Make atos stdin a non-tty pipe to make sure it's not stuck waiting for user input
Anna Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 22:52:35 PST 2016
zaks.anna added a comment.
LGTM
================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc:187
+ // Set up stdin to be the pipe, infd[0] is our reading end.
+ close(STDIN_FILENO);
----------------
This might be a bit more readable:
`// infd[0] is the child's reading end.
close(infd[1]);`
`// Setup stdin to serve as the infd pipe.
close(STDIN_FILENO);
CHECK_GE(dup2(infd[0], STDIN_FILENO), 0);
close(infd[0]);`
Repository:
rL LLVM
https://reviews.llvm.org/D27239
More information about the llvm-commits
mailing list