Checking for waiting characters

Brent P. Callaghan brent at poseidon.UUCP
Tue May 13 05:22:11 AEST 1986


Try this:

   jmp_buf env ;

   ringgg () { longjmp(env,1) ; }
     :
     :
   signal(SIGALRM, ringgg) ;
   alarm(timeout) ;

   nchars = setjmp(env)==0 ? read(tty, buff, BUFSZ) : 0 ;
   
-- 
				
Made in New Zealand -->		Brent Callaghan
				AT&T Information Systems, Lincroft, NJ
				{ihnp4|mtuxo|pegasus}!poseidon!brent
				(201) 576-3475



More information about the Comp.unix.wizards mailing list