summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/clvmd.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-12-22 12:10:56 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-12-22 12:10:56 +0000
commit1febdf9a370502581a834dd48e683228375ba69b (patch)
tree38f85c8cf440f9a5f76ae3cc1303fdf9b5cc47c1 /daemons/clvmd/clvmd.c
parentfe71257ebd81f53f32a6c6332439c700b2d11fc9 (diff)
downloadlvm2-1febdf9a370502581a834dd48e683228375ba69b.tar.gz
lvm2-1febdf9a370502581a834dd48e683228375ba69b.tar.xz
lvm2-1febdf9a370502581a834dd48e683228375ba69b.zip
Log error state from pthread_join operation
Value jstat is unused - so replace it with logging via log_sys_error().
Diffstat (limited to 'daemons/clvmd/clvmd.c')
-rw-r--r--daemons/clvmd/clvmd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 1a35c495..ae4da65c 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -666,7 +666,6 @@ static int local_pipe_callback(struct local_client *thisfd, char *buf,
/* EOF on pipe or an error, close it */
if (len <= 0) {
- int jstat;
void *ret = &status;
close(thisfd->fd);
@@ -677,7 +676,9 @@ static int local_pipe_callback(struct local_client *thisfd, char *buf,
/* Reap child thread */
if (thisfd->bits.pipe.threadid) {
- jstat = pthread_join(thisfd->bits.pipe.threadid, &ret);
+ if (pthread_join(thisfd->bits.pipe.threadid, &ret))
+ log_sys_error("pthread_join", "");
+
thisfd->bits.pipe.threadid = 0;
if (thisfd->bits.pipe.client != NULL)
thisfd->bits.pipe.client->bits.localsock.
@@ -1041,7 +1042,6 @@ static int read_from_local_sock(struct local_client *thisfd)
/* EOF or error on socket */
if (len <= 0) {
int *status;
- int jstat;
DEBUGLOG("EOF on local socket: inprogress=%d\n",
thisfd->bits.localsock.in_progress);
@@ -1068,9 +1068,10 @@ static int read_from_local_sock(struct local_client *thisfd)
pthread_cond_signal(&thisfd->bits.localsock.cond);
pthread_mutex_unlock(&thisfd->bits.localsock.mutex);
- jstat =
- pthread_join(thisfd->bits.localsock.threadid,
- (void **) &status);
+ if (pthread_join(thisfd->bits.localsock.threadid,
+ (void **) &status))
+ log_sys_error("pthread_join", "");
+
DEBUGLOG("Joined child thread\n");
thisfd->bits.localsock.threadid = 0;