Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site dartvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!dartvax!lorien From: lorien@dartvax.UUCP (Lorien Y. Pratt) Newsgroups: net.unix,net.unix-wizards Subject: Curses signal handling question Message-ID: <1259@dartvax.UUCP> Date: Mon, 16-Apr-84 10:38:00 EST Article-I.D.: dartvax.1259 Posted: Mon Apr 16 10:38:00 1984 Date-Received: Tue, 17-Apr-84 08:34:50 EST Organization: Dartmouth College Lines: 28 I have a program that uses the curses package. I am attempting to implement a feature where, after a certain amount of user idle time, the program disconnects itself. The section of code that I've written to implement this feature looks like the following: signal(SIGALRM,hangup); /* If the alarm sounds, log user off */ alarm(NUMSEC); /* Call the alarm clock */ wgetstr( window, line ); /* Get a line from the screen */ signal(SIGALRM,SIG_IGN); /* If we returned from input routine, ignore alarm */ (`hangup()' is my own disconnect routine) This does not work. When not using curses, however, it works like a dream. So I strongly suspect that curses is ignoring SIGALRM calls. I've been through the curses source, however, and can't find any code that looks like an alarm-ignorer. I'm running under 4.2BSD. Help! --Lorien Y. Pratt Dartmouth College Library Hanover, NH 03755 decvax!dartvax!lorien