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