Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 Unisoft-Cosmos; site kepler.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!lll-crg!well!micropro!kepler!mojo From: mojo@kepler.UUCP (Morris Jones) Newsgroups: net.unix Subject: 4.2bsd, signals, system calls Message-ID: <379@kepler.UUCP> Date: Mon, 25-Nov-85 20:52:53 EST Article-I.D.: kepler.379 Posted: Mon Nov 25 20:52:53 1985 Date-Received: Wed, 27-Nov-85 05:43:12 EST Organization: MicroPro Int'l Corp., San Rafael, CA Lines: 19 I've been porting the recently posted "chat" program to 4.2bsd, and as we all know, 4.2 does not terminate a system call on a signal. I'm running into the problem that people who ^C (intr) out of the program are sometimes left with a process that runs forever, despite hanging up, quit signals, etc. Kill -9 works. My theory is that the intr occurs during a getchar(), during a read from the console, and the read is sticking around refusing to die. If my trap for intr doesn't do an exit(), but merely sets a flag and returns, what is the best way for me to force the getchar() to terminate and return to the program? -- Mojo ... Morris Jones, MicroPro Product Development {ptsfa,hplabs,glacier,lll-crg}!well!micropro!kepler!mojo {ucbvax,decwrl}!dual!micropro!kepler!mojo