[Lldb-commits] [PATCH] D38938: Logging: provide a way to safely disable logging in a forked process
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 20 14:14:19 PDT 2017
labath updated this revision to Diff 119710.
labath added a comment.
The previous fix had a problem where a more paraniod libc (e.g., android, but I
suspect freebds would do that as well) would detect that the
thread unlocking the mutex is not the same one as the one that locked, and
refused to comply.
The new fix is a combination of the first two solutions: we disable the logging
via custom code after forking, but we still do it via pthread_atfork to avoid
this detail leaking outside the Log implementation. The added benefit is that
forking code does not need to worry about logging at all, as it will be
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3473 bytes
Desc: not available
More information about the lldb-commits