Skip to Content.
Sympa Menu

freetds - RE: asprintf vasprintf

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: asprintf vasprintf
  • Date: Thu, 29 Aug 2002 09:53:33 -0400


There just doesn't seem to be any way to safely change the signal handler on
the fly in a library function like this, without potentially causing
undesired behavior in another thread. In particular, all pthread calls are
off-limits in signal handlers, which makes it virtually impossible to do
anything about this.

I've decided to take another approach and provide a completely different
implementation of vasprintf() that will be used when thread safety is
enabled. Stay tuned for another patch later today.

--nick

-----Original Message-----
From: Castellano, Nicholas
Sent: Wednesday, August 28, 2002 2:48 PM
To: 'TDS Development Group'
Subject: RE: [freetds] RE: asprintf vasprintf


The performance penalty won't be significant. It will only prevent more
than one dbfcmd() from executing concurrently. Execution is pretty fast
even for large queries, so contention should be minimal.

The SIGSEGV will be synchronous, so it will be delivered to the correct
thread. However, the signal handler is process-wide. So, if some other
thread happens to generate a SIGSEGV while that signal handler is installed,
then it will incorrectly invoke our signal handler. I think I have a
workable solution for this, but it's tricky. I'll see what I can do.


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page