Skip to Content.
Sympa Menu

freetds - Re: Some (other) patches

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Cameron <james.cameron AT hp.com>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Cc: Frediano.Ziglio AT omnitelvodafone.it
  • Subject: Re: Some (other) patches
  • Date: 28 May 2002 11:14:06 +1000

On Tue, 2002-05-28 at 00:33, ZIGLIO Frediano wrote:
> 6 - for timeout you used select with 0 timeout looping and releasing cpu to
> kernel at every kernel schedule. So you can waste a lot of cpu time. This
> patch pass timeout to select so process is suspended until timeout, error or
> signal (such as interrupt). Also remove some duplicated select and finish
> code to check for EINTR error on select (this should be done on read/write
> too)

Since I was the last person to fiddle with this bit of code ... Frediano
has improved on what I had done. Well done.

Brian, I've reviewed this patch (#6) and it looks okay.

Frediano, can you predict what will happen if a connection is made while
the network cable is unplugged, but before the timeout occurs the
network cable is restored, and then the connection is refused?

Looking at the code as you have written it, it makes me think that the
connection refused won't be noticed, and a timeout will occur ...
because the select is only waiting for writeability and the result of
the connect is not checked.

Shouldn't it also call getsockopt() using SOL_SOCKET and SO_ERROR, to
get the deferred errno return from connect()?

Lastly, in write.c, there is a check for writeability using select, but
no code to handle the timeout.

--
James Cameron (james.cameron AT hp.com)

http://quozl.linux.org.au/ (or) http://quozl.netrek.org/

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.24.

Top of Page