From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: can't seem to get signal handling to work Date: Fri, 28 Jan 2000 09:24:10 +0200 Organization: NetVision Israel Lines: 18 Message-ID: <3891441A.8DACBA1A@is.elta.co.il> References: <30E4AB64FBD5D01191E500805FC108F00479756A AT ex1 DOT elcsci DOT com> NNTP-Posting-Host: ras1-p45.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 949044259 3991 62.0.172.47 (28 Jan 2000 07:24:19 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 28 Jan 2000 07:24:19 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Mehmet Alpay wrote: > > Well, I have to hand it to you sir: you are right on the money! :-) The > program was indeed running under NT, and the error window title was > "ntvdm.exe - Application Error" The code itself was an example I took > directly from Ira Pohl's "A Book on C", which is attached below. Are there > any work-arounds for this problem? The only work-around I know of is not to use NT. The code you wrote will work as you'd expect on any other platform supported by DJGPP. The NT bug is so basic that I don't see how it can be worked around. It seems like NTVDM uses the DJGPP application's stack to do some of its bookkeeping, which is an absolute no-no when handling an exception in the application, because that exception could be caused by the app's data segment being invalid in the first place (which is exactly what happens with DJGPP's signal machinery). But if anyone finds a way of making this work, please report it here. IMHO, this is one of the gravest limitations of using DJGPP on NT.