I advise taking rush out of the equation, and invoke your perl script
directly from DOS, so that the system() command invokes the bat script,
and check for exit code behavior that way.
Can you show us the scripts you currently have?
Luke Cole wrote:
My initial attempt involved a rush render script in perl that would call
Cleaner in command line mode via the perl system() call. This would
result in Cleaner launching and displaying an error dialog complaining
about invalid syntax, even though the exact same command typed into the
console (rather than invoking it programmatically from perl using
system()) executes successfully
What's the command being run?
Possibly it's just a matter of using the correct quoting
of the command being passed to system().
As a second attempt, I created a small DOS batch file containing the
Cleaner command and invoked this from my rush render script, hence
shielding perl from the evil windows command switches (which only appear
inside the batch file). Calling the batch file from the perl script
worked better - the job is queued up and renders on our Cleaner machine
successfully, the output from Cleaner is captured in the rush logs,
unfortunately however the batch file never seems to return once the
Cleaner render has finished, and so the rush job runs forever.
I tried putting in an exit statement in my batch file after the call to
cleaner to ensure that the correct return code is being generated,
however it seems that this line never gets called when I execute the bat
file from within my perl render script - when I run the batch file
directly in the console instead, everything behaves as expected.
What happens if you run the perl script from the command line?
Maybe it's not rush, but perl's system()?
I presume that this issue is due to the way the Win32 console behaves
when invoked programmatically - I was wondering if there is some special
trick that I need to get batch files working correctly with rush?
Batch scripts should probably be run with:
cmd /c \\path\to\foo.bat arg1 arg2
In perl, you have to be sure to escape the backslashes correctly,
so that the perl interpreter doesn't interpret the slashes as
escape sequences (like \n, \e, etc)
Show us what you have, and what command you're trying to run.
(I myself am not familiar with the cleaner program)
--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|