view modules/sleep @ 12326:25e64e77bb53

sleep: work around cygwin bug On cygwin 1.5.x, sleep amounts larger than 49.7 days (2**32 milliseconds) failed instantly, but with a garbage return value from uninitialized memory. * lib/sleep.c (rpl_sleep): Work around the bug. * m4/sleep.m4 (gl_FUNC_SLEEP): Detect the bug. (gl_PREREQ_SLEEP): Delete unused macro. * modules/sleep (Depends-on): Add verify. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default. * modules/unistd (Makefile.am): Substitute witness. * lib/unistd.in.h (sleep): Update prototype. * doc/posix-functions/sleep.texi (sleep): Document the bug. * tests/test-sleep.c (main) [HAVE_DECL_ALARM]: Test it. * modules/sleep-tests (Depends-on): Check for alarm. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 18 Nov 2009 20:07:44 -0700
parents 27a1858c4c79
children efab6978105e
line wrap: on
line source

Description:
sleep() function: pause execution of the current thread.

Files:
lib/sleep.c
m4/sleep.m4

Depends-on:
stdint
unistd
verify

configure.ac:
gl_FUNC_SLEEP
gl_UNISTD_MODULE_INDICATOR([sleep])

Makefile.am:

Include:
<unistd.h>

License:
LGPLv2+

Maintainer:
Bruno Haible