#!/bin/sh -e
#
# Valgrind won't work in most of the cases when it detects a NPTL
# based system. See bugs #220161, #218609, #218611, #218629
export LD_ASSUME_KERNEL=2.4.1

# If libc6-dbg is installed, use it as default LD_LIBRARY_PATH.
# If /usr/lib/debug doesn't exist, it will be ignored in the lib path.
if [ -z $LD_LIBRARY_PATH ]; then
	export LD_LIBRARY_PATH=/usr/lib/debug
else
	export LD_LIBRARY_PATH=/usr/lib/debug:$LD_LIBRARY_PATH
fi

# use 'exec' to avoid having another shell process hanging around.
exec $0.bin "$@"

