1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

clvmd: always set cleanup_needed

When thread is created, set the cleanup_needed flag
immediately so it could be used properly any time later
when cleanup_zombie() is needed.
This commit is contained in:
Zdenek Kabelac 2014-03-21 11:46:50 +01:00
parent 5bea2b5c82
commit 05a532e171

View File

@ -1261,7 +1261,6 @@ static int read_from_local_sock(struct local_client *thisfd)
/* EOF or error on socket */
if (len <= 0) {
thisfd->bits.localsock.cleanup_needed = 1;
cleanup_zombie(thisfd); /* we ignore errors here */
return 0;
} else {
@ -1457,6 +1456,7 @@ static int read_from_local_sock(struct local_client *thisfd)
/* Run the pre routine */
thisfd->bits.localsock.in_progress = TRUE;
thisfd->bits.localsock.state = PRE_COMMAND;
thisfd->bits.localsock.cleanup_needed = 1;
DEBUGLOG("Creating pre&post thread\n");
status = pthread_create(&thisfd->bits.localsock.threadid,
&stack_attr, pre_and_post_thread, thisfd);