[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel vs. pppd

> > > (b) SunOS has EWOULDBLOCK handling in it's output() handler
> > > (see sys-sunos4.c).
> ...
> > I don't see what you want to say about (b)?
> Someone who cares could be inspired to write the equivalent for
> parisc-linux and put the hack in the app instead of glibc or the kernel.

No. I disagree. The app is broken for following a glibc-ism/linux-ism in
assuming that EWOULDBLOCK == EAGAIN. Where in fact the sys-linux.c:output() 
should be doing the same thing as sys-sunos4.c:output() and checking for
both values! The compiler will take care of collapsing the boolean logic
into a smaller check if the values are the same.

Creating a sys-parisc-linux.c would be as easy as:
cat sys-linux.c | \
sed 's/errno == EWOULDBLOCK/(errno == EWOULDBLOCK || errno == EAGAIN)/g' \
> sys-parisc-linux.c


I can add this to my todo list, but it won't get done until I fix glibc :)


Reply to: