On Thu, 29.01.15 21:54, tomazzi ([email protected]) wrote:

> But that's not really a problem, since the handler is not even re-entrant
> (f.e. due to dynamic memory allocation performed trough log_xxxx macros ->
> log_full_errno -> log_internal -> journal-send.c::_printf_() -> vasprintf()
> )

There is no such call chain. log_internal() does not invoke any
function from journal-send.c.

Our internal non-structured logging code does not allocate dynamic
memory, since we want to be able to aclal it in signal handlers, and
allocating dynamic memory is not OK in signal handlers.

The structured logging code does allocate memory (log_struct() and
friends), simply because I couldn't find a nice way how to pull that
off. However this should not really be a limitation, the rule is
simply that our signal handlers should not invoke structured logging
functions, but only the non-structured ones.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to