Fix: lttng-ust-comm: wait on wrong child process
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Sep 2022 12:37:35 +0000 (13:37 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Sep 2022 20:35:18 +0000 (21:35 +0100)
commit7496c9f18349fbbd9244339f2cf59d94321ecb9a
tree7810f6a66cf7e812a14323341bfb9373e2d70bab
parent51faf6d07397a7a706a0bfabfa82fa7699c77ebe
Fix: lttng-ust-comm: wait on wrong child process

The code currently assumes that the forked process is the only child
process at that point in time. However, there can be unreaped child
processes as reported in the original bug.

From wait(3), as currently used, "status is requested for any child
process."

Using the pid explicitly ensures a wait on the expected child process.

More context is available at:
https://bugs.lttng.org/issues/1359

Fixes #1359
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8a4621d79c61f7dfefde5c2b94bdee9752e1973d
liblttng-ust/lttng-ust-comm.c
This page took 0.024881 seconds and 4 git commands to generate.