From: Randolph Chung <randolph@tausq.org>
To: Jochen Friedrich <jochen@scram.de>
Cc: HP900 PARISC mailing list <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] definition of EWOULDBLOCK in /usr/include/asm/errno.h
Date: Mon, 9 Sep 2002 15:04:49 -0700 [thread overview]
Message-ID: <20020909220448.GP17893@tausq.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0209092343150.2394-100000@alpha.bocc.de>
> because of the unusual definition of EWOULDBLOCK, zebra currently doesn't
> work (zebra checks for EWOULDBLOCK in zebra/rt_netlink.c and will loop if
> it gets EAGAIN instead and both are not the same).
>
> I'm not sure what's the correct fix for this, change errno.h to match the
> definition of the other archs or change zebra to check for EAGAIN as
> well...
I assume you are refering to this bit of code:
status = recvmsg (nl->sock, &msg, 0);
if (status < 0)
{
if (errno == EINTR)
continue;
if (errno == EWOULDBLOCK)
break;
zlog (NULL, LOG_ERR, "%s recvmsg overrun", nl->name);
continue;
}
On some SysV systems EAGAIN != EWOULDBLOCK. I think we inherited the
errno definitions from HPUX...
glibc's documentation says:
Portability Note: In many older Unix systems, this condition was indicated by EWOULDBLOCK, which was a distinct error code different from EAGAIN. To make your program portable, you should check for both codes and treat them the same.
sounds like good advice to me.. :-)
it does say, however, that for glibc EWOULDBLOCK and EAGAIN should have
the same value though, so i guess ours is wrong... i wonder if we'll
break things if we changed it.
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next prev parent reply other threads:[~2002-09-09 22:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-09 21:46 [parisc-linux] definition of EWOULDBLOCK in /usr/include/asm/errno.h Jochen Friedrich
2002-09-09 22:04 ` Randolph Chung [this message]
2002-09-10 16:18 ` [parisc-linux] HPUX guru needed -> " Carlos O'Donell
2002-09-10 20:22 ` [parisc-linux] " Jochen Friedrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020909220448.GP17893@tausq.org \
--to=randolph@tausq.org \
--cc=jochen@scram.de \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox