Eric:

Yes, I remember you.  Thanks for spotting this.

The "bug" has been there since the beginning.  It arises recently because newer versions of Linux have gone to using poll instead of select as the preferred way of doing non-blocking I/O.  In the Linux version of poll.h POLLWRNORM and POLLOUT are different bits.  In LiS poll.h (and virtually all Unix versions) they are the same bit.  If LiS gets compiled with its own poll.h and your application with the Linux poll.h this can happen.

Far be it from the Linux kernel guys to take a peek at Solaris or Unixware when they code some feature such as poll.  Wouldn't want to have compatible constants would we?  That might lead to some binary compatibility sneaking in.

The next version of LiS will be more "aware" of this problem.

By the way, there are similar problems in stropts.h regarding the definitions of the standard ioctls.  The GNU libc guys coded up a stropts.h file for Unix98 compatibility with the usual disregard for what has gone before with Solaris and Unixware and came up with constants that varied from "standard" Unix values.  I have worked this out with them and there will be a version of glibc, and the next version of LiS, in which the stropts.h constants will mutually compatible and compatible with Solaris and Unixware.  The LiS values needed to change a little as well -- in our case it was a typo that cascaded into some incompatible constants.  The next version of LiS will also take this problem into account.

-- Dave

[EMAIL PROTECTED] wrote:

Hi,

I am an old LiS user (2 years ago), and I am updating my package (from Linux 2.0
to Linux 2.2). I am using LiS 2.6. All is working find except for poll. Before I look
more in detail, it seems that poll is returning 0 when using POLLOUT flag in place
of returning a number > 0. Two year ago this was working. Do you already know
this bug and do you have a patch ?

My computer is a Linux 2.2.13 (Slackware 7) on Intel.

Thank you.

Éric Lévénez

--
---------------------------------------------------------------------
Éric Lévénez   Pmail:DASSAULT A.T., BP13, 78373 Plaisir Cedex, France
Tel:+33(0)130812075 Fax:+33(0)130812344 Email:[EMAIL PROTECTED]
---------------------------------------------------------------------
"We are Microsoft.  You will be assimilated.   Resistance is futile."

Hi, 

I have found the problem in LiS 2.6 with the poll function. To make it work 
well, I have change in "head/head.c" the line : 

   if (lis_bcanputnext(hd->sd_wq, 0)) 
         revents |= POLLWRBAND; 

to : 

   if (lis_bcanputnext(hd->sd_wq, 0)) 
#ifdef KERNEL_2_1 
         revents |= POLLWRBAND | POLLOUT; 
#else 
         revents |= POLLWRBAND; 
#endif 

And now poll with POLLOUT flag is working fine on Linux 2.2. 

Éric.

 

Reply via email to