Date: Thu, 7 Oct 1999 19:01:15 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Tim Bedding cc: "'djgpp AT delorie DOT com'" Subject: Re: Problems using signals In-Reply-To: <01BF10C3.98917580@tim.polyhedra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 7 Oct 1999, Tim Bedding wrote: > Due to a mistake, I ran a program containing > a tight loop. This simple program did not explicitly define > or call any signal functions. > > I could not interrupt the program using Ctrl-C. > > Is this to be expected? Yes. The DJGPP signal-generation doesn't work if/when the program is stuck in a tight loop that doesn't touch any data, and when the program is inside a call to any real-mode service (DOS, BIOS, etc.). This is described in the docs (see the documentation of the library function `signal', under "Signal Mechanism Implementation Notes"). > Is there a way to program > or compile in order to make sure that the program > is always interruptable somehow? I'm not aware of any way to do that, except avoiding tight loops that don't touch any data, and are infinite loops on top of that ;-) Sorry, the DPMI spec simply doesn't leave any other safe way of supporting signals. > I have read the info documentation of the signal function. Then I don't understand how come you didn't know this is expected behavior. Unless you have an old libc.info file from DJGPP v2.01, that is.