On 7/28/20 9:44 AM, Lennart Poettering wrote:
Is the service short-lived? There's a race: if a process runs very
quickly and logs journald might process the message after the process
already exited, i.e. at a time where we can't read the cgroup off the
process anymore.

It is indeed a very short-lived "service".  (All it does is check a
few things, write 1 value to a sysfs file, and exit.)

You can artifically delay your service's exit (sleep 10...) but it's
still racy and sucks hard. You could issue the equivalent of
"journalctl --sync" at the end of your program...

Is there an API for that?

--
========================================================================
                 In Soviet Russia, Google searches you!
========================================================================

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to