How can I read keyboard without stopping

Dave Burton daveb at laidbak.UUCP
Wed Aug 24 00:23:51 AEST 1988


In article <1202 at tjalk.cs.vu.nl> maart at cs.vu.nl () writes:
|In article <1246 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse) writes:
|\		- generally, non-blocking mode *must* be turned off or
|\		  the shell will die - so you must trap SIGBUS,
|\		  SIGSEGV, SIGINT, etc.
|Are you saying that the shell will die if a CHILD sets the non-blocking mode?
|I guess your operating system isn't Unix.

Consider what read(2) returns in non-blocking mode. I'd bet that the
input routine for the shell says something to the effect of:

	if ((cc = read(0, buf, sizeof buf)) == 0) {	/* EOF seen */
		cleanup();
		exit(0);
	}
-- 
Dave Burton		| ``/* You are not expected to understand this. */''
{att,sun}!laidbak!daveb	|
(312) 505-9100 x325	| Disclaimer: I channel only for myself.



More information about the Comp.unix.wizards mailing list