Mail Archives: djgpp/1999/10/07/17:58:17
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.
- Raw text -