I can definitely take a look at it tomorrow. Just wanted to check the
intention. As long as oiiotool exits non-zero when there are write errors,
that would be a win.


On Fri, 28 Nov 2014 8:36 PM Larry Gritz <[email protected]> wrote:

> I think returning 0 from this function is fine, but I agree that if some
> output file is unable to write, a flag should be set so that oiiotool as a
> whole gives a shell return code indicating an error (i.e., not zero).
>
> This is not intentional, and returning an error code so it can be scripted
> with error checks is a good thing. So it should definitely be fixed.
>
> I can do it if you want, or feel free to give it a stab. Let me know which
> you prefer.
>
> -- lg
>
>
>
> On Nov 27, 2014, at 4:09 PM, Justin Israel <[email protected]> wrote:
>
> I'm curious about some behaviour I am seeing, and whether or not anyone
> has encountered this and found it to be problematic?
>
> oiiotool seems to exit with an exitcode 0 even if the file it was writing
> failed:
>
> https://github.com/OpenImageIO/oiio/blob/master/src/oiiotool/oiiotool.cpp#L540
>
> So what I end up seeing in my render pipeline process is that oiiotool
> kind of blows through a sequence "successfully" even if the output
> directory did not exist. Is this expected behaviour or a bug? Do most
> people tack on a post check that all of the frames are there? I had assumed
> I could rely on the exitcode to know if the call to oiiotool failed to do
> the job.
>
> Is this something that would break people if it were corrected to return a
> non-zero exit code if the write fails?
>
>
> --
> Larry Gritz
> [email protected]
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to