1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-28 05:57:33 +03:00
Zbigniew Jędrzejewski-Szmek 65b3903ff5 journal: guarantee async-signal-safety in sd_journald_sendv
signal(7) provides a list of functions which may be called from a
signal handler. Other functions, which only call those functions and
don't access global memory and are reentrant are also safe.
sd_j_sendv was mostly OK, but would call mkostemp and writev in a
fallback path, which are unsafe.

Being able to call sd_j_sendv in a async-signal-safe way is important
because it allows it be used in signal handlers.

Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an
open-coded writev replacement which uses write. Unfortunately,
O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is
unavailable, an open-coded mkostemp is used.

https://bugzilla.gnome.org/show_bug.cgi?id=722889
2014-01-27 23:17:02 -05:00
..
2013-12-25 22:53:45 -05:00
2013-11-13 22:56:22 -05:00
2013-07-03 08:19:20 -04:00
2014-01-11 23:45:17 -05:00
2013-12-25 22:53:46 -05:00
2013-07-03 08:19:20 -04:00
2013-07-03 08:19:20 -04:00
2013-11-07 01:23:54 -05:00
2013-07-03 08:19:20 -04:00
2013-12-25 22:53:45 -05:00
2013-12-08 19:26:51 -05:00
2013-09-12 22:09:57 +02:00
2013-12-25 22:53:45 -05:00
2013-12-25 22:53:45 -05:00
2013-12-25 22:53:45 -05:00
2014-01-11 23:45:17 -05:00
2013-12-25 22:53:45 -05:00
2014-01-04 23:21:13 +01:00