|
![](/i/fill.gif) |
POVRay for UNIX does not exit with a non-zero exit status when an Error(..)
occurs (such as during parsing).
In order to fix that, the following patch is the easiest way I could come
up with. Maybe not 100% clean (if exit codes can be >=999999):
-----------<patch.diff>------------
diff -urN povray-3.6/unix/config.h povray-3.6-modified/unix/config.h
--- povray-3.6/unix/config.h 2004-07-18 12:16:27.000000000 +0200
+++ povray-3.6-modified/unix/config.h 2004-08-11 19:51:28.000000000 +0200
@@ -159,9 +159,9 @@
/*
* POVMS stuff.
*/
-#define POVRAY_BEGIN_COOPERATE if(setjmp(globalSetJmpEnv) == 0) {
-#define POVRAY_END_COOPERATE }
-#define EXIT_POVRAY(n) longjmp(globalSetJmpEnv, 1)
+#define POVRAY_BEGIN_COOPERATE int _rv=setjmp(globalSetJmpEnv); if(_rv==0) {
+#define POVRAY_END_COOPERATE } else if(_rv!=1) throw (_rv-1000000);
+#define EXIT_POVRAY(n) longjmp(globalSetJmpEnv, n ? (n+1000000) : 1)
/*
* Namespace.
--------------------------------------
Please consider fixing this in the next release.
Wolfgang
Post a reply to this message
|
![](/i/fill.gif) |