1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-24 17:57:48 +03:00

Don't send a signal to kill threads that are idling nicely as it upsets them.

This seems to cure bz#159727 on SMP systems.

Alasdair, can you include this patch in the lvm2-cluster package please ?
This commit is contained in:
Patrick Caulfield 2005-08-09 10:39:57 +00:00
parent e817a0b35c
commit 4bb7474e8a

View File

@ -747,6 +747,7 @@ static int read_from_local_sock(struct local_client *thisfd)
/* If the client went away in mid command then tidy up */
if (thisfd->bits.localsock.in_progress) {
pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2);
pthread_mutex_lock(&thisfd->bits.localsock.mutex);
thisfd->bits.localsock.state = POST_COMMAND;
pthread_cond_signal(&thisfd->bits.localsock.cond);
@ -763,7 +764,6 @@ static int read_from_local_sock(struct local_client *thisfd)
thisfd->bits.localsock.state = PRE_COMMAND;
pthread_cond_signal(&thisfd->bits.localsock.cond);
pthread_mutex_unlock(&thisfd->bits.localsock.mutex);
pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2);
jstat =
pthread_join(thisfd->bits.localsock.threadid,