diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /gnu/libexec/uucp/libunix/sleep.c | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) |
Diffstat (limited to 'gnu/libexec/uucp/libunix/sleep.c')
-rw-r--r-- | gnu/libexec/uucp/libunix/sleep.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/sleep.c b/gnu/libexec/uucp/libunix/sleep.c index b232f9674ff05..910c9292e1981 100644 --- a/gnu/libexec/uucp/libunix/sleep.c +++ b/gnu/libexec/uucp/libunix/sleep.c @@ -10,5 +10,17 @@ void usysdep_sleep (c) int c; { +#if HAVE_NAPMS || HAVE_NAP || HAVE_USLEEP || HAVE_SELECT || HAVE_POLL + int i; + + /* In this case, usysdep_pause is accurate. */ + for (i = 2 * c; i > 0; i--) + usysdep_pause (); +#else + /* On some system sleep (1) may not sleep at all. Avoid this sort + of problem by always doing at least sleep (2). */ + if (c < 2) + c = 2; (void) sleep (c); +#endif } |