[Nix-dev] Will there be a systemd replacement at any time inthe future?

Lluís Batlle i Rossell viric at viric.name
Tue Sep 2 12:25:59 CEST 2014


On Tue, Sep 02, 2014 at 12:21:20PM +0200, Vladimír Čunát wrote:
> On 09/02/2014 11:36 AM, Eelco Dolstra wrote:
> >However, there is a long-standing issue with stdout/stderr logging: if the
> >process dies before systemd has had a change to process its log message, then
> >systemd may not be able to figure out the unit corresponding to the message, so
> >it may be lost (or not attributed to the unit). See
> >
> >   http://lists.freedesktop.org/archives/systemd-devel/2012-June/005590.html
> 
> I didn't investigate details, but I suspect that losing the last
> parts of logs could be caused by the fact that stdout is buffered by
> default (and stderr is not). I don't know if the contents of the
> buffer residing in the crashed process can be well recovered.
> Perhaps they have some hack to force the flush externally, I don't
> know.
> 
> See e.g. http://stackoverflow.com/questions/7876660/how-to-turn-off-buffering-of-stdout-in-c

If that is the case, maybe we can run the daemons with "stdbuf -o 0 daemon". I
understood from previous letters that *stderr* messages were lost, not *stdout*,
but that maybe was a reference to upstart. The systemd archive reference
mentions some unlink between unit and log, which would be a completely differen
case.

Regards,
Lluís.


More information about the nix-dev mailing list