summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-13 09:28:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-13 09:28:16 +0100
commit7a00472067403ebe1cfbedbfabfde03cc19c9c34 (patch)
tree3adafccd2d60e8520e76fcef4564c2298338e56f
parentd5bd33427f73d01d59e6021c7436d98d8c9fffd2 (diff)
Better fix for the valgrind.log problem.
Only redirect to valgrind.log if --valgrind but not $VALGRIND is given.
-rwxr-xr-xdesktop/scripts/soffice.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 1ae4fb71231e..4d140512338a 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -151,6 +151,12 @@ if [ -n "$GDBTRACECHECK" ] ; then
exec $GDBTRACECHECK "$sd_prog/soffice.bin" "$@"
fi
+# valgrind --log-file=valgrind.log does not work well with --trace-children=yes
+if [ -n "$VALGRINDCHECK" -a -z "$VALGRIND" ] ; then
+ echo "redirecting the standard and the error output to valgrind.log"
+ exec &>valgrind.log
+fi
+
# do not pass the request for command line help to oosplash
if test "$#" -eq 1; then
case "$1" in