LVM2/daemons/clvmd clvmd.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-12-22 14:00:30
Modified files:
daemons/clvmd : clvmd.c
Log message:
Fix last pthread_join fix commit
Call for pthread_join() does not set errno value even though return values looks like that. For now assign errno from return value and still use strerror() to print some error message as this seems to be commonly used.
Add also log_sys_error() message for error close of local pipe.
daemons/clvmd/clvmd.c +6 -4
@@ -667,7 +667,8 @@/* EOF on pipe or an error, close it */ if (len <=0 ) {void *ret = &status; -close (thisfd->fd); +if (close (thisfd->fd)) +log_sys_error ("close" ,"local_pipe" );/* Clear out the cross-link */ if (thisfd->bits.pipe.client !=NULL )
@@ -676,7 +677,8 @@/* Reap child thread */ if (thisfd->bits.pipe.threadid) { -if (pthread_join (thisfd->bits.pipe.threadid, &ret)) +if ((errno =pthread_join (thisfd->bits.pipe.threadid, + &ret)))log_sys_error ("pthread_join" ,"" ); thisfd->bits.pipe.threadid =0 ;
@@ -1068,8 +1070,8 @@pthread_cond_signal (&thisfd->bits.localsock.cond);pthread_mutex_unlock (&thisfd->bits.localsock.mutex); -if (pthread_join (thisfd->bits.localsock.threadid, - (void **) &status)) +if ((errno =pthread_join (thisfd->bits.localsock.threadid, + (void **) &status)))log_sys_error ("pthread_join" ,"" );DEBUGLOG ("Joined child thread\n" );