Skip to Content.
Sympa Menu

freetds - Re: [freetds] siginterrupt

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] siginterrupt
  • Date: Mon, 28 Jan 2008 10:49:37 -0500

On Jan 28, 8:53am, jklowden AT freetds.org ("James K. Lowden") wrote:
-- Subject: Re: [freetds] siginterrupt

| ZIGLIO, Frediano, VF-IT wrote:
| > I finally found why signal handling can be so different from system to
| > system. The reason is RESTART flag. If this flag is set select do not
| > interrupt and return EINTR but just continue.
|
| My copy of Steven's UNP is at home. I think that flag may not be
| standard?

It is standard:

http://www.opengroup.org/onlinepubs/009695399/functions/sigaction.html

It is best practice to assume that it is not set and handle the INTR in
a loop:

http://www.opengroup.org/pubs/online/7908799/xsh/select.html

There are also issues in select that can cause it to fail if memory
or other resources are not available, so a lot of applications prefer
to use it with file descriptors set for non-blocking-io. This would
make the FreeTDS code a lot more complicated, for a dubious gain.
Most implementation support poll these days, and poll has a lot more
portable behavior.

christos




Archive powered by MHonArc 2.6.24.

Top of Page