[all-commits] [llvm/llvm-project] 51b557: Add an error message to the default SIGPIPE handler

Tim Northover via All-commits all-commits at lists.llvm.org
Wed Jun 8 08:34:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51b557adc131d8c66306ae74ce3bbaaa2e366dc3
      https://github.com/llvm/llvm-project/commit/51b557adc131d8c66306ae74ce3bbaaa2e366dc3
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M llvm/lib/Support/Unix/Signals.inc
    A llvm/test/tools/llvm-nm/unix03-sigpipe-exit.test

  Log Message:
  -----------
  Add an error message to the default SIGPIPE handler

UNIX03 conformance requires utilities to flush stdout before exiting and raise
an error if writing fails. Flushing already happens on a call to exit
and thus automatically on a return from main. Write failure is then
detected by LLVM's default SIGPIPE handler. The handler already exits with
a non-zero code, but conformance additionally requires an error message.




More information about the All-commits mailing list