On Thu, Jul 06, 2000 at 10:19:02AM +0200, [EMAIL PROTECTED] wrote: > Although my previous patch works, it doesn't solve the real problem. > I have tested a bit more and found out that you cannot set POLLHUP in the > events field on IRIX. This will cause an immediate return by poll which > causes the excessive CPU usage. > > Attached patch eliminates the POLLHUP bit in the events field. > > The IRIX manual page about POLLHUP: > > POLLHUP A hangup has occurred on the stream. This event and > POLLOUT are mutually exclusive; a stream can never be > writable if a hangup has occurred. However, this event > and POLLIN, POLLRDNORM, POLLRDBAND, or POLLPRI are not > mutually exclusive. This flag is only valid in the > revents bitmask; it is not used in the events field. > > I also checked the Solaris 2.6 and Linux manual pages and they both state > the the POLLHUP bit flag is only valid in the revents field. > It is probably harmless on those platforms to have it in the events field, > but it obviously isn't on IRIX. > > Robert > > > -- > Robert H. de Vries mailto:[EMAIL PROTECTED] > PO/SIM > Fokker Space B.V. http://www.fokkerspace.nl > tel: (+31)71-5245464 fax: (+31)71-5245498 > --- Event-0.78/c/unix.c.orig Thu Jul 6 09:02:31 2000 > +++ Event-0.78/c/unix.c Thu Jul 6 10:10:19 2000 > @@ -89,7 +89,7 @@ > ev->xref = -1; > assert(fd >= 0); { > int bits=0; > - if (ev->poll & PE_R) bits |= (POLLIN | POLLRDNORM | POLLHUP); > + if (ev->poll & PE_R) bits |= (POLLIN | POLLRDNORM); > if (ev->poll & PE_W) bits |= (POLLOUT |POLLWRNORM |POLLWRBAND); > if (ev->poll & PE_E) bits |= (POLLRDBAND | POLLPRI); > assert(bits); { Applied. Thanks! -- "Never ascribe to malice that which can be explained by stupidity." via, but not speaking for Deutsche Bank
