delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/09/29/04:13:38

Date: Sun, 29 Sep 1996 10:10:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: `abort' in nested programs
Message-Id: <Pine.SUN.3.91.960929100249.20703G-100000@is>
Mime-Version: 1.0

If `abort' is called in a program that was spawned by another DJGPP
program, it wedges the machine.  That's because `abort' calls `_exit', and
so bypasses the call to `__djgpp_exception_toggle' (which is installed
with a call to `atexit').  After that, the first keypress crashes the
system. 

I'm not sure about the best way to solve this.  Would a call to 
`__djgpp_exception_toggle' inside `abort' be OK?  It would be nice to 
call it inside `_exit', but that won't work since `exit' calls `_exit'.  
Is there a way to detect whether exceptions point to the handlers inside 
surrently executing program?

Anyway, I think making `abort' crash the entire system is too much of 
``aborting''.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019