salamanderrake

man 3 sleep

May 29th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. SLEEP(3) Linux Programmer's Manual SLEEP(3)
  2.  
  3.  
  4.  
  5. NAME
  6. sleep - sleep for the specified number of seconds
  7.  
  8. SYNOPSIS
  9. #include <unistd.h>
  10.  
  11. unsigned int sleep(unsigned int seconds);
  12.  
  13. DESCRIPTION
  14. sleep() makes the calling thread sleep until seconds seconds have elapsed or a signal arrives which is not ignored.
  15.  
  16. RETURN VALUE
  17. Zero if the requested time has elapsed, or the number of seconds left to sleep, if the call was interrupted by a signal handler.
  18.  
  19. CONFORMING TO
  20. POSIX.1-2001.
  21.  
  22. BUGS
  23. sleep() may be implemented using SIGALRM; mixing calls to alarm(2) and sleep() is a bad idea.
  24.  
  25. Using longjmp(3) from a signal handler or modifying the handling of SIGALRM while sleeping will cause undefined results.
  26.  
  27. SEE ALSO
  28. alarm(2), nanosleep(2), signal(2), signal(7)
  29.  
  30. COLOPHON
  31. This page is part of release 3.50 of the Linux man-pages project. A description of the project, and information about reporting
  32. bugs, can be found at http://www.kernel.org/doc/man-pages/.
Advertisement
Add Comment
Please, Sign In to add comment