if (__nanosleep (&ts, &ts) == 0) result = 0;
if (__sigemptyset (&set) < 0 || __sigaddset (&set, SIGCHLD) < 0 || __sigprocmask (SIG_BLOCK, &set, &oset)) return -1;   if (!__sigismember (&oset, SIGCHLD)) { int saved_errno;   if (__sigaction (SIGCHLD, (struct sigaction *) NULL, &oact) < 0) { saved_errno = errno;  (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL); __set_errno (saved_errno); return -1; }  if (oact.sa_handler == SIG_IGN) {  result = __nanosleep (&ts, &ts);  saved_errno = errno;  (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL); __set_errno (saved_errno); } else {  (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL); result = __nanosleep (&ts, &ts); } }
__sleep (unsigned int seconds){  struct timespec ts = { tv_sec: (long int) seconds, tv_nsec: 0 };  unsigned int result;  if (__nanosleep (&ts, &ts) == 0)    result = 0;  else    /* Round remaining time.  */    result = (unsigned int) ts.tv_sec + (ts.tv_nsec >= 500000000L);  return result;}