[systemd-devel] [PATCH] journal: return -ECHILD after a fork

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Wed Jul 17 11:07:53 PDT 2013


On Wed, Jul 17, 2013 at 11:05:38AM -0700, Shawn wrote:
> Hi!
> 
> 
> On Tue, Jul 16, 2013 at 8:50 AM, Lennart Poettering
> <lennart at poettering.net>wrote:
> 
> > On Wed, 26.06.13 19:55, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl)
> > wrote:
> >
> > > A few asserts are replaced with 'return -EINVAL'. I think that
> > > assert should not be used to check argument in public functions.
> > >
> > > Fields in struct sd_journal are rearranged to make it less
> > > swiss-cheesy.
> > > ---
> > > Does this look sound?
> >
> > Yupp! Looks great! Please commit!
> >
> Wouldn't this be better using pthread_atfork() to avoid all the getpid()
> calls?
For better or worse, getpid() results are cached by glibc anyway, so
current implementation should be efficient enough.

Zbyszek


More information about the systemd-devel mailing list