Mail Archives: djgpp/1998/01/15/06:17:39
On Wed, 14 Jan 1998, Nate Eldredge wrote:
> >No. SIGINT is not a true exception, it is faked by the DJGPP keyboard
> >handler when it sees either Ctrl-C or Ctrl-BREAK. By the time your
> >handler is called, you are in a safe state, so you can do anything and
> >don't need to lock.
> This is true of all signals, right? Including hardware-generated ones like
> SIGSEGV?
Mostly, yes. However, when SIGSEGV comes not from your program that
just happened to dereference a null pointer, but from a real page
fault in the DPMI host which somehow got unhandled by its VM manager,
I would not risk another page fault that will be generated by your
handler being paged out at that time. DOS is certainly non-reentrant,
and I don't generally trust even MS-Windows to handle such nested
faults gracefully.
Of course, usually you shouldn't have a reason to install a handler
that is meant to catch real exceptions which don't originate from
something your program did.
- Raw text -