paraview-mesa: fix usage of the kwsys Process API
Not waiting for the process to exit caused the exit code to be fetched at the wrong time. Copy code structure from CMake for proper usage.
Not waiting for the process to exit caused the exit code to be fetched at the wrong time. Copy code structure from CMake for proper usage.