llvm-project/llvm
Vedant Kumar e05baf40de [InitLLVM] Ensure SIGPIPE handler installed before sigaction()
The pipe signal handler must be installed before any other handlers are
registered. This is because the Unix RegisterHandlers function does not
perform a sigaction() for SIGPIPE unless a one-shot handler is present,
to allow long-lived processes (like lldb) to fully opt-out of llvm's
SIGPIPE handling and ignore the signal safely.

Fixes a bug introduced in D70277.

Tested by running Nick's test case:

% xcrun ./bin/clang -E -fno-integrated-cc1 x.c | tee foo.txt | head

I verified that child cc1 process exits with IO_ERR, and that the parent
recognizes the error code, exiting cleanly.

Differential Revision: https://reviews.llvm.org/D94324
2021-01-08 15:13:04 -08:00
..
benchmarks
bindings [Go] Fix bindings/go/llvm/IRBindings.cpp 2020-12-16 10:09:58 -08:00
cmake [CMake] Fix incorrect rpath for tests if LLVM_LOCAL_RPATH isn't set 2021-01-08 21:24:18 +02:00
docs [TableGen] Add the assert statement, step 1 2021-01-08 09:47:51 -05:00
examples [NFC] Reduce include files dependency and AA header cleanup (part 2). 2020-12-17 14:04:48 +03:00
include [InitLLVM] Ensure SIGPIPE handler installed before sigaction() 2021-01-08 15:13:04 -08:00
lib [InitLLVM] Ensure SIGPIPE handler installed before sigaction() 2021-01-08 15:13:04 -08:00
projects
resources
runtimes [OpenMP] Fixed the issue that CMake variables for OpenMP were not passed through when building OpenMP with LLVM_ENABLE_RUNTIMES 2020-12-20 18:40:12 -05:00
test [NFC] Disallow unused prefixes in CodeGen/AMDGPU 2021-01-08 11:49:23 -08:00
tools [llvm-readobj] [ARMWinEH] Clearly print an invalid case of packed unwind info as such 2021-01-08 10:04:44 +02:00
unittests [AArch64] Add +flagm archictecture option, allowing the v8.4a flag modification extension. 2021-01-08 13:21:12 +00:00
utils [gn build] Port 9c4b2225b2 2021-01-08 13:30:54 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Remove Python2 fallback and only advertise Python3 in the doc 2020-12-17 15:40:16 +01:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.