1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

path: cancel paths threads

This commit is contained in:
Steffen Vogel 2019-02-12 18:17:09 +01:00
parent 3816b8f45e
commit 0cbbd0a53c

View file

@ -828,6 +828,11 @@ int path_stop(struct path *p)
if (p->state != STATE_STOPPING)
p->state = STATE_STOPPING;
/* Cancel the thread in case is currently in a blocking syscall */
ret = pthread_cancel(p->tid);
if (ret)
return ret;
ret = pthread_join(p->tid, NULL);
if (ret)
return ret;