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

2013-07-17 Thread Lennart Poettering
On Wed, 17.07.13 11:05, Shawn (shawnland...@gmail.com) wrote: Wouldn't this be better using pthread_atfork() to avoid all the getpid() calls? No pthread_atfork() is not useful for much since it gives no ordering guarantees. Threading and forking doesn't mix well, and neither do single-use

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

2013-07-16 Thread Lennart Poettering
On Wed, 26.06.13 19:55, Zbigniew Jędrzejewski-Szmek (zbys...@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

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

2013-06-26 Thread Zbigniew Jędrzejewski-Szmek
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? Zbyszek TODO | 5 +--