Fix: race between kconsumerd and sessiond on tear down
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 3 Sep 2015 21:48:36 +0000 (17:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 5 Sep 2015 19:55:41 +0000 (15:55 -0400)
commit4e4714cb244d7ace4f4a462a3923066fd4760669
tree12aa6622759a8c4df206472b0598c4c11a1a76e5
parentb4d096a6292e78c601dba161dbb15f48ad89935f
Fix: race between kconsumerd and sessiond on tear down

v2: minimize indentation by using return on condition.

Kconsumerd and sessiond both have reference on lttng-module. This can lead to a race
on modprobe_remove_lttng_all which might fail to unload modules due to
certain modules not having a ref count equal to zero at the time.

waitpid is used to force a synchronization on the child (kconsumer) termination.

This also have been applied to ust consumers for the sake of consistency.

Fixes: #878
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.025337 seconds and 4 git commands to generate.