imap/src/osdep/unix/env_unix.c
/* Wait for stdin input
 * Accepts: timeout in seconds
 * Returns: T if have input on stdin, else NIL
 */
Wait for stdin input
Accepts: timeout in seconds
Returns: T if have input on stdin, else NIL
Wait for stdin input Accepts : timeout in seconds Returns : T if have input on stdin else NIL
long server_input_wait (long seconds)
{
  fd_set rfd,efd;
  struct timeval tmo;
  FD_ZERO (&rfd);
  FD_ZERO (&efd);
  FD_SET (0,&rfd);
  FD_SET (0,&efd);
  tmo.tv_sec = seconds; tmo.tv_usec = 0;
  return select (1,&rfd,0,&efd,&tmo) ? LONGT : NIL;
}
long server_input_wait ( long seconds ) { fd_set rfd , efd ; struct timeval tmo ; FD_ZERO ( & rfd ) ; FD_ZERO ( & efd ) ; FD_SET ( 0 , & rfd ) ; FD_SET ( 0 , & efd ) ; tmo . tv_sec = seconds ; tmo . tv_usec = 0 ; return select ( 1 , & rfd , 0 , & efd , & tmo ) ? LONGT : NIL ; }
Wait for stdin input
 Accepts: timeout in seconds
 Returns: T if have input on stdin, else NIL
Wait for stdin input Accepts : timeout in seconds Returns : T if have input on stdin else NIL