summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-06-24 16:11:53 +0200
committerPetr Mladek <pmladek@suse.cz>2011-06-24 16:12:59 +0200
commit20726f2d95777784d8c969d5d762ad8238803f6d (patch)
treef6b364952ca1af80d7d351a1dffd3068aaf9b7bb
parent60e8d375393dd5ddd7b12265cbd2707dd8510165 (diff)
valgrind --log-file=valgrind.log does not work well with --trace-children=yes
redirect output of the stdout and stderr
-rwxr-xr-xdesktop/scripts/soffice.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 77767ebee1..3e0219bb2c 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -116,7 +116,7 @@ for arg in $@ $VALGRINDOPT ; do
valgrind_skip='--trace-children-skip=*/java'
fi
# finally set the valgrind check
- VALGRINDCHECK="valgrind --tool=$VALGRIND --log-file=valgrind.log --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101"
+ VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101"
checks="c$checks"
if [ "$VALGRIND" = "memcheck" ] ; then
export G_SLICE=always-malloc
@@ -159,5 +159,11 @@ 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" ] ; then
+ echo "redirecting the standard and the error output to valgrind.log"
+ exec &>valgrind.log
+fi
+
# oosplash does the rest: forcing pages in, javaldx etc. are
exec $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash.bin" "$@"