Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site myab.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!enea!chalmers!myab!lars From: lars@myab.UUCP (lars) Newsgroups: net.unix-wizards Subject: strange behaviour with background process. Message-ID: <114@myab.UUCP> Date: Mon, 22-Jul-85 19:43:32 EDT Article-I.D.: myab.114 Posted: Mon Jul 22 19:43:32 1985 Date-Received: Fri, 26-Jul-85 00:46:17 EDT Reply-To: lars@myab.UUCP (lars) Organization: MYAB, Sweden Lines: 34 I am running on SVR2 and tried to make the following program to work. It almost works (prints done every 10'th second), but whenever I press the interrupt key to stop some program, the interrupt is caught by this program. If I press the 'quit' key, a core is dumped. I even tried the following: run 'sh', start the program, stop the 'sh' and the hit the 'intr' key. It was caught ! Is this a bug or a feature ? The program: #include int interr(); main() { if (fork()) return; signal(SIGINT, interr); while (1) { sleep(10); printf("done\n"); } } interr() { signal(SIGINT, interr); printf("int\n"); } -- ______________________________________________________ Lars Pensjo {decvax,philabs}!mcvax!enea!chalmers!myab!lars