On Sun, 26.01.14 00:21, Zbigniew Jędrzejewski-Szmek ([email protected]) wrote:
> This will only work on Linux >= 3.11, and probably not on all > filesystems. Fallback code is provided. > --- > Hi, > > because on bug https://bugzilla.gnome.org/show_bug.cgi?id=722889, I > was looking into async signal safety of the journal logging functions. > All that do any formatting are unsafe, but sd_journal_sendv *almost* > is. Currently it calls mkostemp and writev, but only in the fallback > path. So for the purpose of simple logging without multi-megabyte > messages it already is safe. But it would be nice to turn this into an > explicit guarantee. When O_TMPFILE is not available, it is hard to Yupp, it's certainly a good idea to make our logging functions safe for execution in any context. What I don't understands though is why mkostemp() would not be safe here? > +#ifdef O_TMPFILE > + fd = open(path, flags | O_TMPFILE, S_IRUSR | S_IWUSR); > + if (fd >= 0) > + return fd; > +#endif Hmm, O_TMPFILE sounds like something to define in missing.h and then unconditionally use... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
