[Bf-committers] Yafray exec fails on OSX

Ton Roosendaal bf-committers@blender.org
Sun, 25 Jan 2004 13:51:19 +0100


Hi,

The code as is now in yafray/intern/export_File.cpp doesn't work on  
OSX. The weird thing is that it behaves different when you try 'Render'  
a 2nd time. Then it clearly starts yafray up to the rendering phase,  
giving progress print ending with:

[############............................] first render pass

(I call blender from Terminal, with  
./blender.app/Contents/MacOS/blender -p 200 200 800 700)

With help from Zr, I tried the more 'official' unix method for this,  
using fork() and execv().

pid= fork();
if(pid==0) {	// child process
	char *args[5];
	args[0]= "/usr/local/bin/yafray";
	args[1] = "-c";
	args[2]="0";
	args[3]="/tmp/YBtest.xml";
	args[4]= NULL;
	execv(args[0], args);
}
else {
	waitpid(pid, &res, 0);
}

This doesn't work either.

Calling yafray from commandline works OK:
 > /usr/local/bin/yafray -c 0 "/tmp/YBtest.xml"

Starting Blender with Finder makes no difference.

I am clueless!

-Ton-


------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org