Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!hplabs!pyramid!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.unix.wizards Subject: O_NDELAY (Re: How can I read keyboard without stopping) Summary: file flags are shared between processes. Keywords: curses keyboard Message-ID: <4540@cbmvax.UUCP> Date: 23 Aug 88 02:54:06 GMT References: <813@ms3.UUCP> <1246@mcgill-vision.UUCP> <1202@tjalk.cs.vu.nl> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 20 In article <1202@tjalk.cs.vu.nl> maart@cs.vu.nl () writes: >Are you saying that the shell will die if a CHILD sets the non-blocking mode? >I guess your operating system isn't Unix. I guess you don't know how fcntl works. File flags are in the file structure, shared between parent & child processes after a fork. Try this program: #include main(){fcntl(0, F_SETFL, O_NDELAY);} and then try to get some work done... If you're lucky you'll just get logged out. -- -=] Ford [=- . . (In Real Life: Mike Ditto) . : , ford@kenobi.cts.com This space under construction, ...!ucsd!elgar!ford pardon our dust. ditto@cbmvax.commodore.com