Fix: use non block waitpid to lookup child state
authorDavid Goulet <dgoulet@efficios.com>
Thu, 21 Nov 2013 18:02:40 +0000 (13:02 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 22 Nov 2013 19:25:19 +0000 (14:25 -0500)
commit077df0b372f77833c1de2dd9f534dec9e75696de
tree999f18199ae3e66b51b3b863b37435b2209619b5
parentdd2c2a1b8ad6c0fb516f7e7c1bf1adfa6b93b8e6
Fix: use non block waitpid to lookup child state

When daemonizing the session daemon, if the child fails *before* it
could set the recv_child_signal variable that indicates the parent to
exit, the parent process gets in an infinite loop never returning.

This commit fixes that by adding a non blocking waitpid() that monitors
the status of the child so it can exit if the child failed.

Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.025848 seconds and 5 git commands to generate.