Fix: don't use daemon() to daemonize
authorDavid Goulet <dgoulet@efficios.com>
Tue, 12 Nov 2013 17:34:14 +0000 (12:34 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 12 Nov 2013 19:52:03 +0000 (14:52 -0500)
commit0bb7724acebb12e986b55e04f13233710d8c71fa
treedbce2a378eea9fafbbb016df47839fc3e4ad3b5b
parent13021756b87be3b7e41083f607fa0a54792d153a
Fix: don't use daemon() to daemonize

This is done because now we can control when the parent should return
from the fork(). With this patch, it only returns when the session
daemon is ready to operate meaning it can receive commands.

The daemonize process for the child mimicks daemon(3) as in it sets the
setsid, chdir to / and dup 0, 1 and 2 into /dev/null.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.026161 seconds and 5 git commands to generate.