Mail Archives: djgpp-workers/2000/05/11/09:01:20
> Date: Tue, 02 May 2000 18:31:45 +0200
> From: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
>
> For instance if you take GNU make Version 3.77
> and run from it a program that raises such an exception
> then its make itself that crashes with a SIGFPE !!
FYI: I've just sent a patch to the GNU Make maintainer that prevents
Make from crashing on Windows when a child program triggers an FP
exception. The patch is reproduced below, for those who would like to
patch their binaries.
Make 3.79.1 is entering a pretest, so I expect this feature to be in
the official release very soon.
2000-05-10 Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
* main.c (main) [__MSDOS__]: Add SIGFPE to signals we block when
running child programs, to prevent Make from dying on Windows 9X
when the child triggers an FP exception.
--- main.c~1 Fri Apr 7 20:17:28 2000
+++ main.c Wed May 10 19:47:28 2000
@@ -853,6 +853,13 @@ int main (int argc, char ** argv)
FATAL_SIG (SIGINT);
FATAL_SIG (SIGTERM);
+#ifdef __MSDOS__
+ /* Windows 9X delivers FP exceptions in child programs to their
+ parent! We don't want Make to die when a child divides by zero,
+ so we work around that lossage by catching SIGFPE. */
+ FATAL_SIG (SIGFPE);
+#endif
+
#ifdef SIGDANGER
FATAL_SIG (SIGDANGER);
#endif
- Raw text -