if [ "$arg_syswide_daemon" != "1" ];
then
pidfilepath="/tmp/usttrace-$USER-$(date +%Y%m%d%H%M%S%N)-ust-consumerd-pid"
if [ "$arg_syswide_daemon" != "1" ];
then
pidfilepath="/tmp/usttrace-$USER-$(date +%Y%m%d%H%M%S%N)-ust-consumerd-pid"
# ust-consumerd sets up its server socket
# ust-consumerd opens the pidfile, blocks because no one has opened it
# we open pidfile
# ust-consumerd sets up its server socket
# ust-consumerd opens the pidfile, blocks because no one has opened it
# we open pidfile
# ust-consumerd writes to pidfile
# ust-consumerd closes pidfile
# we unblock reading pidfile
# ust-consumerd writes to pidfile
# ust-consumerd closes pidfile
# we unblock reading pidfile