diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-12-30 10:45:45 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-12-30 10:45:45 +0000 |
commit | 5c62002cc864b92f9c1517449e197c55adb9ff44 (patch) | |
tree | c8fd2041c99369d8f54ed6be394695a02fd38919 /libc/unistd/usleep.c | |
parent | 8d532c51318bad2436880ecac972c9dfa3996c9b (diff) |
Make sleep behave itself properly inthe presence of SIGCHLD
Diffstat (limited to 'libc/unistd/usleep.c')
-rw-r--r-- | libc/unistd/usleep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/unistd/usleep.c b/libc/unistd/usleep.c index 25979681d..55e8f3fb7 100644 --- a/libc/unistd/usleep.c +++ b/libc/unistd/usleep.c @@ -5,9 +5,9 @@ int usleep (__useconds_t usec) { - const struct timespec ts = { - tv_sec: (long int)(usec / 1000000), - tv_nsec: (long int) (usec % 1000000) * 1000ul }; - return(nanosleep(&ts, NULL)); + const struct timespec ts = { + .tv_sec = (long int) (usec / 1000000), + .tv_nsec = (long int) (usec % 1000000) * 1000ul + }; + return(nanosleep(&ts, NULL)); } - |