------------------------------------------------------------------------------
| 117 | |
| 118 | //------------------------------------------------------------------------------ |
| 119 | bool vtkPSystemTools::FindProgramPath(const char* argv0, std::string& pathOut, |
| 120 | std::string& errorMsg, const char* exeName, const char* buildDir, const char* installPrefix) |
| 121 | { |
| 122 | vtkMultiProcessController* controller = vtkMultiProcessController::GetGlobalController(); |
| 123 | int retVal = 1; |
| 124 | if (controller->GetLocalProcessId() == 0) |
| 125 | { |
| 126 | retVal = static_cast<int>(vtksys::SystemTools::FindProgramPath( |
| 127 | argv0, pathOut, errorMsg, exeName, buildDir, installPrefix)); |
| 128 | } |
| 129 | controller->Broadcast(&retVal, 1, 0); |
| 130 | // if the retVal on proc 0 is non-zero then only information is |
| 131 | // put in pathOut. Otherwise information is put in errorMsg. |
| 132 | if (retVal) |
| 133 | { |
| 134 | vtkPSystemTools::BroadcastString(pathOut, 0); |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | vtkPSystemTools::BroadcastString(errorMsg, 0); |
| 139 | } |
| 140 | return retVal != 0; |
| 141 | } |
| 142 | |
| 143 | //------------------------------------------------------------------------------ |
| 144 | std::string vtkPSystemTools::GetCurrentWorkingDirectory(bool /* collapse */) |
nothing calls this directly
no test coverage detected