Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemonize sessiond on lttng create #28

Closed
wants to merge 1 commit into from

Conversation

eepp
Copy link
Member

@eepp eepp commented Aug 27, 2015

See commit msg.

@eepp eepp force-pushed the daemonize-sessiond-on-create branch 3 times, most recently from 9a24e68 to dcc25df Compare August 27, 2015 21:13
Since the session daemon forked by `lttng create` shares its
standard output/error FDs when not using `--daemonize`, redirecting
the standard output/error of this command to another program "hangs"
because the session daemon never terminates.

Example that's not working (when sessiond is not running):

    lttng create | wc

or:

    lttng 2>&1 | wc

Using sessiond's `--daemonize` option makes it close its FDs. This
option also ensures that when the sessiond process exits, it has forked
itself as a daemon and is ready to accept commands. Therefore we don't
need to catch SIGCHLD and SIGUSR1; just waitpid() on sessiond's PID and
make sure it exited normally and with an exit status of 0 to continue.
@eepp eepp force-pushed the daemonize-sessiond-on-create branch from dcc25df to abffe8e Compare August 27, 2015 21:14
@jgalar jgalar added this to the LTTng 2.7 milestone Sep 1, 2015
@jgalar
Copy link
Member

jgalar commented Sep 6, 2015

Merged with modifications, thanks!

@jgalar jgalar closed this Sep 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants