From: "Joel Soete" <jsoe0708@tiscali.be>
To: "Carlos O'Donell" <carlos@baldric.uwo.ca>,
"Randolph Chung" <randolph@tausq.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] pppd, pthread and hppa-linux question?
Date: Tue, 11 Feb 2003 20:00:06 +0100 [thread overview]
Message-ID: <3E4844100000055D@ocpmta7.freegates.net> (raw)
In-Reply-To: <3E481EBE00000086@ocpmta3.freegates.net>
Hi all,
>
>>
>>On Mon, Feb 10, 2003 at 08:13:04AM -0800, Randolph Chung wrote:
>>> > All seems to work fine, never the less I notice some pppd messages
which
>>> > I do not noticed on my i386 Debian GNU/Linux box:
>>> > ...
>>> > Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
>>> > Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily
>>unavailable
>>>
>>> this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
>>> to probably fix this in glibc.... let's add it to Carlos' todo list!
:-)
>>
>>It's already in my TODO :)
>>
>>-- snip --
>>- EWOULDBLOCK emulation
>> = Is EWOULDBLOCK emulation required?
>> = What happens if we alias EWOULDBLOCK as EAGAIN
>> = from the kernel hearders?
>> - Break HPUX compat?
>>-- snip --
>>
>>As JDA notes we still have broken atomic functions in atomicity. Which
>>we are planning to fix with a light weight syscall.
>>
Awaiting this Carlos work, I suggest following workaround:
--- ppp-2.4.1.uus.orig/pppd/sys-linux.c
+++ ppp-2.4.1.uus/pppd/sys-linux.c
@@ -929,7 +933,7 @@
fd = ppp_dev_fd;
}
if (write(fd, p, len) < 0) {
- if (errno == EWOULDBLOCK || errno == ENOBUFS
+ if (errno == EWOULDBLOCK || errno == EAGAIN || errno == ENOBUFS
|| errno == ENXIO || errno == EIO || errno == EINTR)
warn("write: warning: %m (%d)", errno);
else
@@ -993,7 +997,8 @@
nr = -1;
if (ppp_fd >= 0) {
nr = read(ppp_fd, buf, len);
- if (nr < 0 && errno != EWOULDBLOCK && errno != EIO && errno != EINTR)
+ if (nr < 0 && errno != EWOULDBLOCK && errno !=EAGAIN \
+ && errno != EIO && errno != EINTR)
error("read: %m");
if (nr < 0 && errno == ENXIO)
return 0;
@@ -1001,7 +1006,8 @@
if (nr < 0 && new_style_driver && ifunit >= 0) {
/* N.B. we read ppp_fd first since LCP packets come in there. */
nr = read(ppp_dev_fd, buf, len);
- if (nr < 0 && errno != EWOULDBLOCK && errno != EIO && errno != EINTR)
+ if (nr < 0 && errno != EWOULDBLOCK && errno !=EAGAIN \
+ && errno != EIO && errno != EINTR)
error("read /dev/ppp: %m");
if (nr < 0 && errno == ENXIO)
return 0;
@@ -1035,7 +1041,7 @@
if (n == 0)
fatal("eof on loopback");
- if (errno != EWOULDBLOCK)
+ if (errno != EWOULDBLOCK && errno != EAGAIN)
fatal("read from loopback: %m(%d)", errno);
return rv;
It seems to me to avoid to much annoying messages.
Do you think I woul have to open a pr near debian maintainer pkg?
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
next prev parent reply other threads:[~2003-02-11 19:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-10 16:55 [parisc-linux] pppd, pthread and hppa-linux question? Joel Soete
2003-02-10 16:13 ` Randolph Chung
2003-02-10 17:57 ` Joel Soete
2003-02-10 18:16 ` Joel Soete
2003-02-10 19:46 ` Carlos O'Donell
2003-02-11 6:30 ` Joel Soete
2003-02-11 19:00 ` Joel Soete [this message]
2003-02-10 17:32 ` John David Anglin
2003-02-10 17:42 ` Joel Soete
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=3E4844100000055D@ocpmta7.freegates.net \
--to=jsoe0708@tiscali.be \
--cc=carlos@baldric.uwo.ca \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=randolph@tausq.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.