|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi !
I'm working on a povray frontend called Truevision, and i got a few
difficulties with streams handling of version 3.61. Any idea is welcome !
Here is the story :
_ i'm working with povray 3.61 and c++ on a linux box
_ i launch povray from my frontend using :
_ execve to create the process
_ option +GA to redirect stats to a first pipe ( opened with mkfifo and option
NONBLOCK )
_ a console redirection '&> ' to a second pipe ( opened with mkfifo and no option )
_ each pipe is handled by a thread
_ i also use option 'Display' ( with Xwindow ) and 'Pause When Done' so that user
can watch his pretty new image :)
_ the first pipe ( stats ) gets povray output but ends when render is complete. Last
line
could be, for example, 'rendering line 125 of 425...' and then povray waits for the
user to
click on the window.
_ the second pipe gets nothing until i click on the window and THEN gets "Click on
window to exit..."
I feel povray does not flush its streams before starting to wait for user click... Any
idea to workaround this ?
I could, off course, handle graphic output but i wouldn't have mosaic preview etc...
P.S : This does not happened with povray 3.1
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 26 Jan 2005 18:14:59 +0100, Nicolas Calimet wrote:
>> _ a console redirection '&> ' to a second pipe ( opened with mkfifo and no option
)
>
> The &> syntax will only work on csh-based shells. For all the other
> shell familly (at least sh/bash and possibly zsh, ksh as well) you should use
> the 2> syntax in this case.
I tried '&>' and also '2>', '1>'...
>> I feel povray does not flush its streams before starting to wait for user click...
Any idea to workaround this ?
>
> The stats cannot be flushed until the very end of the rendering, as they
> include wall-clock time information. Normally stderr (that you get with &>) is
> not buffered, so you should get its content without delay. Most likely the pipe
> itself induces input buffering (it makes your connected process read from stdin,
> which is buffered).
In fact i just want to know when render is finished... I used to get ' rendering line
n f n' on one pipe
and 'Click on window to exit' on the second one. Now i get 'rendering line n-m of n'
on the first one and
nothing on the second one. I don't really need complete statistics... Just try :
povray pov.ini +Istuff.pov +P +GAstats.txt 1> output.txt
When pov pause who don't have anything in output.txt and stats.txt is incomplete.
There is no element that can tell me that render is finished...
Thanks !!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
[quoting myself]
>> The &> syntax will only work on csh-based shells.
Well in fact it's plain wrong, sorry. Next time I'll check
the bash manual first :-)
> In fact i just want to know when render is finished... I used to get ' rendering
line n f n' on one pipe
> and 'Click on window to exit' on the second one. Now i get 'rendering line n-m of n'
on the first one and
> nothing on the second one. I don't really need complete statistics...
About the "rendering line m of n" being the last statistics
displayed: sorry but there's no workaround nor "bugfix" at the
moment.
The "Click on window to exit" message is currently sent to
stdout, which is in fact a bug (it should go to stderr instead).
Thanks for pointing this out. Unfortunately in your case there is
no way (at least that I know of) to workaround this problem. Trying
to redirect both stderr and stdout in different ways seems to not
give what you need...
- NC
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 27 Jan 2005 17:29:04 +0100, Nicolas Calimet wrote:
> Unfortunately in your case there is
> no way (at least that I know of) to workaround this problem. Trying
> to redirect both stderr and stdout in different ways seems to not
> give what you need...
>
> - NC
Ok, thanks for all the infos ! I'll wait for the fix.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |