+ # wrapper
+ case $wrapper in
+ valgrind)
+ if (valgrind --version) > /dev/null 2>&1; then
+ set valgrind -q --leak-check=full --time-stamp=yes \
+ --log-file="$logdir/$daemon.valgrind.log.%p" "$@"
+ else
+ log_failure_msg "valgrind not installed, running $daemon without it"
+ fi
+ ;;
+ strace)
+ if (strace -V) > /dev/null 2>&1; then
+ strace="strace -tt -T -s 256 -ff"
+ if (strace -DV) > /dev/null 2>&1; then
+ # Has the -D option.
+ set $strace -D -o "$logdir/$daemon.strace.log" "$@"
+ strace=""
+ fi
+ else
+ log_failure_msg "strace not installed, running $daemon without it"
+ fi
+ ;;
+ glibc)
+ set env MALLOC_CHECK_=2 MALLOC_PERTURB_=165 "$@"
+ ;;
+ '')
+ ;;
+ *)
+ log_failure_msg "unknown wrapper $wrapper, running $daemon without it"
+ ;;
+ esac
+