POV-Ray : Newsgroups : povray.unix : No exit code? : Re: No exit code? Server Time
16 May 2024 21:46:22 EDT (-0400)
  Re: No exit code?  
From: clipka
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.