summaryrefslogtreecommitdiff
path: root/lib/nanosleep.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-12-26 10:19:40 +0000
committerJim Meyering <jim@meyering.net>1999-12-26 10:19:40 +0000
commitf71e656070c8cc83ffae62c7d31aa0ee759f37c2 (patch)
tree3c643f684c94ce80396fe17b30fdabd744cc6f3f /lib/nanosleep.c
parent34c6851c4aae0f54b997d8c59f925ab5bef91fc1 (diff)
downloadcoreutils-f71e656070c8cc83ffae62c7d31aa0ee759f37c2.tar.xz
*** empty log message ***
Diffstat (limited to 'lib/nanosleep.c')
-rw-r--r--lib/nanosleep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/nanosleep.c b/lib/nanosleep.c
index d5789bd46..126a02622 100644
--- a/lib/nanosleep.c
+++ b/lib/nanosleep.c
@@ -22,6 +22,11 @@
#include <sys/types.h>
#include <signal.h>
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -98,5 +103,7 @@ nanosleep (const struct timespec *requested_delay,
/* FIXME: Restore sig handler? */
+ errno = EINTR;
+
return suspended;
}