vsk added a comment.

The issue is that InitLLVM initializes its private PrettyStackPrinter before 
installing the one-shot default SIGPIPE handler: the PrettyStackPrinter itself 
eventually calls RegisterHandlers(), which runs before the SIGPIPE handler is 
installed and therefore doesn't register a SIGPIPE handler.

Why doesn't RegisterHandlers simply unconditionally install llvm's 
"SignalHandler" as a handler for SIGPIPE? We found that it broke lldb's ability 
to ignore SIGPIPE, as RegisterHandlers is called by a ton of library code 
(including library code called by lldb!). I'll be the first to admit that this 
one-shot sigpipe handler business is incredibly fragile, but unfortunately I 
don't have a better solution :/.

The fix is up here: https://reviews.llvm.org/D94324


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70277/new/

https://reviews.llvm.org/D70277

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to