POV-Ray : Newsgroups : povray.unix : Rendering several scenes from c++ program : Re: Rendering several scenes from c++ program Server Time
28 Jun 2024 21:41:14 EDT (-0400)
  Re: Rendering several scenes from c++ program  
From: Cesar
Date: 30 Mar 2005 13:55:01
Message: <web.424af5b4f6d6dc3cedf9457e0@news.povray.org>
Ok. I now create the pipe and set it as the povray output. In my program,
after I create the pipe I fork() and run povray in the child, while in the
parent I read the pipe. But now I get the following error:

Possible Rendering Error: Got 1 SIGPIPE.

I presume it has something to do with the synchronization between reading
from and writing to the pipe, but I can't figure out what's wrong. Can you
help me with that?

Thanks



Vincent LE PRINCE <vin### [at] nospamwanadoofr> wrote:
> On Mon, 28 Mar 2005 07:53:34 -0500, Cesar wrote:
>
> > Tks for answering. I don't get it. What do you mean by 2 pipes? How do I
> > separate text output from the data (if I understood correctly)? At first I
> > won't need to catch error msgs, so I can use the "really more simple"
> > version, but I'm interested in the more complex one too. :o)
>
> Pipes are special files created by mkfifo function ( and some others ones ).
> They are used to communicate between two programs. The first one ( pov )
> writes to the pipe, the second one read in ( your program ). So you invoke
> pov with '+GApipe1 +Opipe2 +FP' and pov writes all text stuff ( stats,
> errors, warnings... ) to pipe1 and image data ( here ppm data ) to pipe2.
> Then you have 2 threads, each of them reading a pipe. Not really easy, and
> certainly the simplest solution, but it works !


Post a reply to this message

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