Fix comments and enforce expected return values
[lttng-tools.git] / src / bin / lttng / lttng.c
index e60b694e43729ab1c7ced011e11c2cae3a5e5433..36d4c913df48ab681cbfac27e428c3f7888d339c 100644 (file)
@@ -316,19 +316,20 @@ static int spawn_sessiond(char *pathname)
        } else if (pid > 0) {
                sessiond_pid = pid;
                /*
-                * Wait for lttng-sessiond to start. We need to use a
-                * flag to check if the signal has been sent to us,
-                * because the child can be scheduled before the parent,
-                * and thus send the signal before this check. In the
-                * signal handler, we set the recv_child_signal flag, so
-                * anytime we check it after the fork is fine. Note that
-                * sleep() is interrupted before the 1 second delay as
-                * soon as the signal is received, so it will not cause
-                * visible delay for the user.
+                * Wait for lttng-sessiond to start. We need to use a flag to check if
+                * the signal has been sent to us, because the child can be scheduled
+                * before the parent, and thus send the signal before this check. In
+                * the signal handler, we set the recv_child_signal flag, so anytime we
+                * check it after the fork is fine. Note that sleep() is interrupted
+                * before the 1 second delay as soon as the signal is received, so it
+                * will not cause visible delay for the user.
                 */
                while (!recv_child_signal) {
                        sleep(1);
                }
+               /*
+                * The signal handler will nullify sessiond_pid on SIGCHLD
+                */
                if (!sessiond_pid) {
                        exit(EXIT_FAILURE);
                }
This page took 0.022945 seconds and 4 git commands to generate.