Skip to Content.
Sympa Menu

freetds - Re: [freetds] Heavy load patch for net.c

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: christos AT zoulas.com (Christos Zoulas)
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Heavy load patch for net.c
  • Date: Fri, 11 Jan 2008 10:57:35 -0500

On Jan 11, 4:49pm, Frediano.Ziglio AT vodafone.com ("ZIGLIO, Frediano, VF-IT")
wrote:
-- Subject: Re: [freetds] Heavy load patch for net.c

| > - Why do you undef USE_POLL?
|
| I use this macro only in net.c to distinguish about poll or select. It
| sum up all tests (HAVE_POLL and HAVE_POLL_H). Do not confuse USE_POLL
| with HAVE_POLL. You can note that USE_POLL is always defined some rows
| ago. It's just to make sure that USE_POLL is not defined.

I understand. I did not see that from the context diff. I meant that
this (USE_POLL) should probably be defined once in the begining of the
file, so that everything uses poll where available. I will download
and take a look in a while.

| > - From the poll(2) opengroup definition:
| >
| > POLLERR
| > An error has occurred on the device or stream. This flag is
| > only valid in the revents bitmask; it is ignored in the events
| > member.
| >
| > POLLHUP
| > The device has been disconnected. 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 ignored in the events
| > member.
| >
| > So you should not use POLLIN|POLLHUP in the read mask,
| > just POLLIN is good
|
| yes, so I should remove POLLHUP from macro.
|
| > enough, and in the error mask, 0 should be ok.
| >
| > christos
|
| What happen in case of error? Error is always returned?? If I put 0 in
| events??

POLLHUP and POLLERR are always returned in revents even if not set
in events per opengroup.

christos




Archive powered by MHonArc 2.6.24.

Top of Page