POV-Ray : Newsgroups : povray.unix : No exit code? Server Time
23 Dec 2024 15:12:04 EST (-0500)
  No exit code? (Message 1 to 3 of 3)  
From: clipka
Subject: No exit code?
Date: 13 Dec 2008 18:45:01
Message: <web.49444884643a78bb6c22a54d0@news.povray.org>
From my experience, it seems that POV (or, to be precise, MegaPOV 1.2.1, but I
guess there shouldn't be a difference there) for Unix does not issue an exit
code when terminating prematurely, although the documentation states it should.

To render a scene that requires other scenes to be rendered first, I set up a
shell script as folows:

    megapov -D MyScene_pre.ini && megapov -D MyScene.ini

Now when MegaPOV reports an error in the first scene, I experience that the
second MegaPOV command is still started.

The same happens when I decide to terminate the render of the first scene by
issuing a SIGTERM to the MegaPOV process.

Am I doing something wrong, or is this just not supported in the Unix version?


Post a reply to this message

From: Jim Henderson
Subject: Re: No exit code?
Date: 16 Dec 2008 21:40:31
Message: <4948669f$1@news.povray.org>
On Sat, 13 Dec 2008 18:43:00 -0500, clipka wrote:

> From my experience, it seems that POV (or, to be precise, MegaPOV 1.2.1,
> but I guess there shouldn't be a difference there) for Unix does not
> issue an exit code when terminating prematurely, although the
> documentation states it should.

I don't know that I have a copy of the MegaPOV code, but I can have a 
look at the POV code this weekend and see if I can determine what it's 
supposed to be doing, since nobody else jumped in here.  That is a 
curious behaviour, though I'm guessing there's no handler for SIGTERM 
(sent from a CTRL-C) and that's what's causing it to exit with a success 
value (I would guess that it is sending an exit code of some sort, just 
not one that indicates failure).

Jim


Post a reply to this message

From: clipka
Subject: Re: No exit code?
Date: 16 Dec 2008 23:00:00
Message: <web.49487931195e5744ecb6e40e0@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> > From my experience, it seems that POV (or, to be precise, MegaPOV 1.2.1,
> > but I guess there shouldn't be a difference there) for Unix does not
> > issue an exit code when terminating prematurely, although the
> > documentation states it should.
>
> That is a
> curious behaviour, though I'm guessing there's no handler for SIGTERM
> (sent from a CTRL-C) and that's what's causing it to exit with a success
> value (I would guess that it is sending an exit code of some sort, just
> not one that indicates failure).

If it was only a SIGTERM handler issue it wouldn't be too much of a problem,
because I could instead terminate the shell script from which I started it,
along with all child processes.

The main problem is that I also get no exit code (or to be more precise, exit
code 0 as it seems) if the render aborts due to a parse error or similar.

In the mean time, however, I found out that this is actually a MegaPOV-only
problem; POV 3.6.1c seems to return a proper exit code.

Strange enough, because from what I see in the code there is no difference
whatsoever regarding the way PoV-ray and MegaPOV terminate.

Maybe it has something to do with the MegaPOV binary being an AMD64 binary; I
could imagine that this may happen to be troublesome with the main() function
being declared as int, and the exit code normally being set by a "return
<whatever>;" statement instead of calling exit().

The POV-ray binary, as far as I can see, is a normal x386 32-bit binary. Aside
from that, chances are it was compiled with a different compiler.

Hm, maybe I need to compile my own version of MegaPOV after all... don't like...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.