Introduce LTTNG_UST_LOADED environment variable
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Jul 2016 19:11:06 +0000 (15:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Jul 2016 19:46:36 +0000 (15:46 -0400)
commit2315088b93f925c5cccee865ccb8f6bc542e52dc
treedfcd42d6cd17c0d831ccfad772ad3dd213c90153
parent3eae1fb99c6821530888b470528299ff187021a8
Introduce LTTNG_UST_LOADED environment variable

Set internally by liblttng-ust's constructor. Can be used by
applications to detect if lttng-ust is loaded, even if liblttng-ust is
not directly linked by the application.

The main use-case is to allow applications to detect that they should
not try to close file descriptors that do not belong to them (e.g.
BSD closefrom). This is a common pattern with applications invoking
daemon(3).

Note that this environment variable is passed to children of a traced
process, and through exec calls. Therefore, an application might think
that lttng-ust is loaded even though it's not loaded in its own address
space if it was loaded by one of its parent processes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/lttng-ust.3.txt
liblttng-ust/lttng-ust-comm.c
This page took 0.02479 seconds and 4 git commands to generate.