overhaul cancellation to fix resource leaks and dangerous behavior with signals
[musl] / src / time / nanosleep.c
index 2f65762..0e0753f 100644 (file)
@@ -8,6 +8,7 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
        int ret;
        CANCELPT_BEGIN;
        ret = syscall(SYS_nanosleep, req, rem);
+       CANCELPT_TRY;
        CANCELPT_END;
        return ret;
 }