From: Pierre-Marc Fournier Date: Wed, 28 Oct 2009 04:19:38 +0000 (-0400) Subject: usttrace: add comments to describe start sequence of ustd X-Git-Tag: v1.9.1~839 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0f3af9f075344751c71324bbbe66fdeb8a5f0a6f;p=lttng-ust.git usttrace: add comments to describe start sequence of ustd --- diff --git a/usttrace b/usttrace index 1db591f3..15336f63 100755 --- a/usttrace +++ b/usttrace @@ -87,6 +87,13 @@ then mkfifo -m 0600 "$pidfilepath" # Start daemon $USTD --pidfile "$pidfilepath" -s "$SOCKPATH" -o "$OUTDIR" >"$OUTDIR/ustd.log" 2>&1 & + # ustd sets up its server socket + # ustd opens the pidfile, blocks because no one has opened it + # we open pidfile + # we block reading pidfile + # ustd writes to pidfile + # ustd closes pidfile + # we unblock reading pidfile USTDPID="$(<$pidfilepath)" export UST_DAEMON_SOCKET="$SOCKPATH" fi