Deadline Scripting BUG? - SpawnProcess

Hi,

Think this is a bug with regard the number of arguments being passed and I’m getting an exception when I try to execute. Quite simply, the “SpawnProcess” command can take 1 or more arguments. However, according to the manual, it should be able to take 4 arguments as below:

Process SpawnProcess( string executable, string arguments, string workingDirectory, ProcessWindowStyle windowStyle )

However this fails and you MUST quote the 5th argument, ie: the boolean value for “redirectStdOutput”, even if it is set to False and hence you don’t want to use it.

ie: this works fine:

Process SpawnProcess( string executable, string arguments, string workingDirectory, ProcessWindowStyle windowStyle, bool redirectStdOutput )

I was scratching my head on this one, but I think its a bug or just the manual needs updating…(I also cross-referenced the PF online manual and also the TB site)

Thanks,
Mike

Hey Mike,

I can reproduce this, but I don’t have the slightest idea why. I checked our API definition, and the function with 4 arguments for SpawnProcess is defined. Even the error from IronPython doesn’t make sense:

If it takes “at most 5”, then 4 arguments should be inclusive. It also works fine with 3 arguments. This definitely seems like an IronPython issue, so the easiest solution might just be to remove the 4 argument version from our documentation. :confused:

Cheers,

  • Ryan