Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2000 19:16:02 -0500
From:      "Thimble Smith" <tim@mysql.com>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: pthread_kill() not killing thread
Message-ID:  <20000324191602.A38647@threads.polyesthetic.msg>
In-Reply-To: <200003242307.SAA08054@pcnet1.pcnet.com>; from eischen@vigrid.com on Fri, Mar 24, 2000 at 06:07:30PM -0500
References:  <200003242307.SAA08054@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 24, 2000 at 06:07:30PM -0500, Daniel Eischen wrote:
>My "interpretation" of the POSIX spec was that intra-process signals
>sent via pthread_kill() were treated differently than if the signal was
>sent to the process.  I'll have to go back and re-read the POSIX spec --
>perhaps I misunderstood it.
>
>At any rate, FreeBSDs threads implementation of pthread_kill() will
>not have the same effect as kill(2) -- the process will not be terminated
>by issuing a pthread_kill(thrd, SIGTERM) to a thread.  Signals sent
>to threads via pthread_kill will invoke a signal handler if it is
>installed and will interrupt the thread from its current operation
>(returning -1 with EINTR).  This all assumes that the thread isn't
>masking the signal, and that the handler isn't installed with SA_RESTART.

OK.  Thanks.  What I'm really trying to do is figure out why
MySQL will hang if you try to shut it down when there is a
connection open to it.  You then have to kill the mysqld
process with -9 in order to get rid of it.  :(

There's a program in the source distribution that tests the
thread signal handling:  mysys/test_thr_alarm.  It hangs in
a similar way.  I'm trying to figure out why.

So, if anybody knows threads well and also has MySQL on their
box, and feels like checking it out, I'd be happy.  I'm sure
I'll figure it out eventually (and it'll be worth it to learn
more about threads), but if anybody can do it in a few seconds
I'd appreciate it.

Tim
-- 
Tim Smith   < tim@mysql.com >  :MySQL Development Team:  Boone, NC  USA.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000324191602.A38647>