[Insight-developers] Using kwsys/Process.h functions
kent williams
norman-k-williams at uiowa.edu
Tue May 1 10:40:15 EDT 2007
I just wrote some code to do coarse-grained parallelism using the
kwsysProcess functions. I run two external programs at the same time on a
multiprocessor.
It worked as advertised except for one thing: If I ran a process
synchronously -- i.e. I didn't set kwsysProcess_Option_Detach -- and then
called kwsysProcess_GetExitValue, the exit code returned was always 1, even
if the program successfully executed.
If I ran the program detached, the correct exit code was returned.
My work around was to run all processes detached, but call
kwsysProcess_GetExitValue to block and wait for the process synchronously if
needed.
Since kwsysProcess is used in Cmake, I assume it has been thoroughly tested,
and I'm just missing something. Am I?
More information about the Insight-developers
mailing list