loolwsd/README | 2 ++ loolwsd/Util.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-)
New commits: commit 6f4336a1fc024c040cabd988479a21620ca8d41f Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Jan 10 22:13:32 2016 -0500 loolwsd: trap segv and bus when LOOL_DEBUG env is defined Change-Id: I56b2c70cd910ff2628e020e494143b8f38c0bd36 Reviewed-on: https://gerrit.libreoffice.org/21332 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/README b/loolwsd/README index cd6e8d8..c441356 100644 --- a/loolwsd/README +++ b/loolwsd/README @@ -141,6 +141,8 @@ sudo ln -s ~/libreoffice/master/lool-child-roots/1046829984599121011/lo /lo Use the ps command to find out exactly the path to use. +Set LOOL_DEBUG=1 to trap SIGSEGV and SEGBUS and prompt for debugger. + Protocol description -------------------- diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp index ee13030..addef5b 100644 --- a/loolwsd/Util.cpp +++ b/loolwsd/Util.cpp @@ -433,8 +433,12 @@ namespace Util sigaction(SIGINT, &aSigAction, nullptr); sigaction(SIGQUIT, &aSigAction, nullptr); sigaction(SIGHUP, &aSigAction, nullptr); - sigaction(SIGBUS, &aSigAction, nullptr); - sigaction(SIGSEGV, &aSigAction, nullptr); + + if (getenv("LOOL_DEBUG")) + { + sigaction(SIGBUS, &aSigAction, nullptr); + sigaction(SIGSEGV, &aSigAction, nullptr); + } #endif } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits