[systemd-devel] [PATCH] util: *DO NOT* loop for EINTR handling with close_nointr()

Colin Walters walters at verbum.org
Thu Jan 31 05:40:04 PST 2013


On Wed, 2013-01-30 at 11:44 -0300, Cristian Rodríguez wrote:
> El 25/01/13 14:27, Colin Walters escribió:
> > Lightly tested in gnome-ostree qemu - review carefully please!
> >
> > See the linked references for why we should not do this.
> >
> > Signed-off-by: Colin Walters <walters at verbum.org>
> > ---
> >   src/shared/util.c |   28 +++++++++++++++++-----------
> >   1 files changed, 17 insertions(+), 11 deletions(-)
> 
> wow. isnt this a bug in libc or the kernel then ?

Don't see what libc could do.  As far as the kernel...I guess
we'd need a new close_nointr system call or something.

Note: I think this is not actually a serious problem in systemd because
it's not (as far as I know) multithreaded.  It's when you have
multithreaded code that you can end up closing another thread's fd
that things get bad.





More information about the systemd-devel mailing list