Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cmcl2!brl-adm!adm!jfjr@mitre-bedford.arpa From: jfjr@mitre-bedford.arpa Newsgroups: comp.unix.wizards Subject: reading from terminal Message-ID: <7749@brl-adm.ARPA> Date: Mon, 8-Jun-87 13:14:07 EDT Article-I.D.: brl-adm.7749 Posted: Mon Jun 8 13:14:07 1987 Date-Received: Wed, 10-Jun-87 04:48:31 EDT Sender: news@brl-adm.ARPA Lines: 29 This may be a trivial question to the wizards but I am a unix novice (~3 months). I need to read a character from the terminal without stopping a program. I have a program thats going to do a lot of interesting things you wouldn't be interested in. I want to give the user the ability to halt the processing at any time - poke around the program and then resume processing. While the program is doing its thing all sorts of terminal and file i/o are happening. I have done this successfully and simply on VMS using qio with the proper flag but I am having problems doing it on Unix. I would rather not have to do this trick by using a second process nor would I want to usurp Control-C. I should qualify the "anytime" above. The program will be (basically) a while loop. I would like to be able to check at the top of the loop to see if the user has entered the proper character - if he/she has then go into the special snooping mode, if no character or the wrong character is entered then ignore and continue with processing. I really must say that Unix documentation compared to VMS doesn't measure up( or maybe I am looking in the wrong places if so enlighten me) Thirster after knowledge Jerry Freedman, Jr "If at first you don't succeed, lower your standards" jfjr@mitre-bedford.arpa (617)271-6248 or 8658