Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!poseidon!brent From: brent@poseidon.UUCP (Brent P. Callaghan) Newsgroups: net.unix-wizards Subject: Re: Checking for waiting characters Message-ID: <1454@poseidon.UUCP> Date: Mon, 12-May-86 15:22:11 EDT Article-I.D.: poseidon.1454 Posted: Mon May 12 15:22:11 1986 Date-Received: Tue, 13-May-86 09:07:06 EDT References: <470@brl-smoke.ARPA> Organization: AT&T Information Systems, Lincroft NJ Lines: 18 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