diff options
Diffstat (limited to 'bin/sleep')
-rw-r--r-- | bin/sleep/sleep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sleep/sleep.c b/bin/sleep/sleep.c index fa7deb2..0d41a42 100644 --- a/bin/sleep/sleep.c +++ b/bin/sleep/sleep.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <ctype.h> #include <err.h> +#include <errno.h> #include <limits.h> #include <signal.h> #include <stdint.h> @@ -87,8 +88,8 @@ main(int argc, char *argv[]) warnx("about %d second(s) left out of the original %d", (int)time_to_sleep.tv_sec, (int)original); report_requested = 0; - } else - break; + } else if (errno != EINTR) + err(1, "nanosleep"); } return (0); } |