+# Establish the environment for the command
+(
+ export UST_TRACE=1
+ export UST_AUTOPROBE=1
+
+ if [ "$arg_preload_libust" = "1" ];
+ then
+ if [ -n "${LIBUST_PATH%libust.so}" ] ; then
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LIBUST_PATH%libust.so}"
+ fi
+ export LD_PRELOAD="$LD_PRELOAD:$LIBUST_PATH"
+ fi
+
+ if [ "$arg_ld_std_ust" = "1" ];
+ then
+ if [ -n "$${LIBUST_PATH%libust.so}" ] ; then
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LIBUST_PATH%libust.so}"
+ fi
+ fi
+
+ if [ "$arg_preload_malloc" = "1" ];
+ then
+ export LD_PRELOAD="$LD_PRELOAD:$LIBMALLOCWRAP_PATH"
+ fi
+
+ if [ "$arg_preload_fork" = "1" ];
+ then
+ export LD_PRELOAD="$LD_PRELOAD:$LIBINTERFORK_PATH"
+ fi
+
+# Install a handler for SIGIO. This is the signal that will be sent by ustd to
+# the traced program to trigger the creation of its listener thread. However,
+# it is possible that the SIGIO will be sent after the shell fork, but before
+# the exec of the command. If this handler isn't there, bash might terminate
+# because of a unhandled signal.