[systemd-devel] [systemd-commits] 7 commits - man/systemd.network.xml po/es.po po/LINGUAS src/journal-remote src/libsystemd src/libsystemd-network
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Fri Mar 13 05:45:30 PDT 2015
On Fri, Mar 13, 2015 at 01:38:23PM +0100, David Herrmann wrote:
> Hi
>
> On Fri, Mar 13, 2015 at 5:27 AM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at kemper.freedesktop.org> wrote:
> > commit f53f7c8fc43df4e38655f2a1f57777c5934fee06
> > Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
> > Date: Thu Mar 12 21:54:14 2015 -0400
> >
> > journal-remote: check also for EWOULDBLOCK
> >
> > This matches similar code elsewhere.
> >
> > diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
> > index 01cfef5..e6aa072 100644
> > --- a/src/journal-remote/journal-remote.c
> > +++ b/src/journal-remote/journal-remote.c
> > @@ -1022,7 +1022,7 @@ static int dispatch_raw_source_event(sd_event_source *event,
> > } else if (r == -E2BIG) {
> > log_notice_errno(E2BIG, "Entry too big, skipped");
> > return 1;
> > - } else if (r == -EAGAIN) {
> > + } else if (r == -EAGAIN || r == -EWOULDBLOCK) {
> > return 0;
> > } else if (r < 0) {
> > log_debug_errno(r, "Closing connection: %m");
>
> What's the reason for this? EWOULDBLOCK is the same as EAGAIN on
> linux. Why don't we get rid of all those EWOULDBLOCK checks in
> systemd? The only other offender I see is udevd, but that can be
> easily changed to EAGAIN.
Sure, if it's guaranteed to be the same, we can get rid of all of them.
I don't care either way, and did this only for consitency with the
inner function, which checks both.
Zbyszek
More information about the systemd-devel
mailing list