1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: trace failing pthread_kill

This commit is contained in:
Zdenek Kabelac 2018-11-02 22:11:18 +01:00
parent 813347cf84
commit 0d934e730e

View File

@ -175,6 +175,7 @@ void process_event(struct dm_task *dmt,
const char *device = dm_task_get_name(dmt); const char *device = dm_task_get_name(dmt);
int percent; int percent;
struct dm_info info; struct dm_info info;
int ret;
/* No longer monitoring, waiting for remove */ /* No longer monitoring, waiting for remove */
if (!state->percent_check) if (!state->percent_check)
@ -205,7 +206,8 @@ void process_event(struct dm_task *dmt,
/* Maybe configurable ? */ /* Maybe configurable ? */
_remove(dm_task_get_uuid(dmt)); _remove(dm_task_get_uuid(dmt));
#endif #endif
pthread_kill(pthread_self(), SIGALRM); if ((ret = pthread_kill(pthread_self(), SIGALRM)) && (ret != ESRCH))
log_sys_error("pthread_kill", "self");
goto out; goto out;
} }
@ -213,7 +215,8 @@ void process_event(struct dm_task *dmt,
/* TODO eventually recognize earlier when room is enough */ /* TODO eventually recognize earlier when room is enough */
log_info("Dropping monitoring of fully provisioned snapshot %s.", log_info("Dropping monitoring of fully provisioned snapshot %s.",
device); device);
pthread_kill(pthread_self(), SIGALRM); if ((ret = pthread_kill(pthread_self(), SIGALRM)) && (ret != ESRCH))
log_sys_error("pthread_kill", "self");
goto out; goto out;
} }