From 000b1ba5610524c1e5a28ec48a9dc990b9b301ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 20 Jan 2018 14:04:17 +1100 Subject: [PATCH 1/2] NEWS: fix typo --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0d2737d106..1d7196af62 100644 --- a/NEWS +++ b/NEWS @@ -5321,7 +5321,7 @@ CHANGES WITH 209: option as supported by Debian is added. It allows indicating which LUKS slot to use on disk, speeding up key loading. - * The sd_journald_sendv() API call has been checked and + * The sd_journal_sendv() API call has been checked and officially declared to be async-signal-safe so that it may be invoked from signal handlers for logging purposes. From 89f552c0e26afd65fc0c825f843aeedc5d8ae29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 20 Jan 2018 14:23:54 +1100 Subject: [PATCH 2/2] man: document signal unsafeness of journal functions Fixes #7912. --- man/sd_journal_get_fd.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml index b162b2bf11..24ececd9cb 100644 --- a/man/sd_journal_get_fd.xml +++ b/man/sd_journal_get_fd.xml @@ -230,6 +230,20 @@ else { journal. + + Signal safety + + In general, sd_journal_get_fd(), + sd_journal_get_events(), and sd_journal_get_timeout() + are not "async signal safe" in the meaning of + signal7. + Nevertheless, only the first call to any of those three functions performs unsafe operations, so + subsequent calls are safe. + + sd_journal_process() and sd_journal_wait() are not + safe. sd_journal_reliable_fd() is safe. + + Notes