Mail Archives: djgpp/1997/02/16/19:09:32
Hi.
Take a program compiled with djgpp 2.0, even a very simple one. Run it under
Linux dosemu (0.64 or 0.65 version). Stop it with ^C and restart it.
If you are not satisfied with the results :(, you can try this patch:
----------------------------------------------------------------------------
diff -urN dosemu-0.65.0.6/src/dosext/dpmi/dpmi.c dosemu-0.65.0.6/src/dosext/dpmi/dpmi.c
--- dosemu-0.65.0.6/src/dosext/dpmi/dpmi.c Fri Jan 24 09:47:46 1997
+++ dosemu-0.65.0.6/src/dosext/dpmi/dpmi.c Sun Feb 16 23:59:47 1997
@@ -2986,7 +2986,13 @@
} /* _trapno==13 */
else
#ifdef __linux__
- do_cpu_exception(scp);
+ /*
+ * When we stop a djgpp program with ^C, it just goes down, and
+ * we get a stack exception. If we continue we stay in DPMI,
+ * and this is _not_ a good thing. dosemu or djgpp library bug?
+ */
+ if (_trapno == 12) quit_dpmi(scp,1); else
+ do_cpu_exception(scp);
#endif
#ifdef __NetBSD__
do_cpu_exception(scp, code);
----------------------------------------------------------------------------
Can someone (Eli?) enlighten me on what's going on when you press ^C?
When a djgpp program terminates normally, I see all the shutdown sequence
up to the int0x21-AX=4Cxx which signals dosemu to quit the DPMI server.
This doesn't happen with ^C; on the dosemu side, I have currently to rely
on the stack fault to understand what went on. There should be a better
way.
Thanks
Alberto
- Raw text -