MCPcopy Create free account
hub / github.com/Kitware/CMake / RunProcess

Method RunProcess

Source/cmWorkerPool.cxx:435–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435bool cmWorkerPoolWorker::RunProcess(cmWorkerPool::ProcessResultT& result,
436 std::vector<std::string> command,
437 std::string const& workingDirectory)
438{
439 if (command.empty()) {
440 return false;
441 }
442 // Create process instance
443 {
444 std::lock_guard<std::mutex> lock(this->Proc_.Mutex);
445 this->Proc_.ROP = cm::make_unique<cmUVReadOnlyProcess>();
446 this->Proc_.ROP->setup(&result, true, std::move(command),
447 workingDirectory);
448 }
449 // Send asynchronous process start request to libuv loop
450 this->Proc_.Request.send();
451 // Wait until the process has been finished and destroyed
452 {
453 std::unique_lock<std::mutex> ulock(this->Proc_.Mutex);
454 while (this->Proc_.ROP) {
455 this->Proc_.Condition.wait(ulock);
456 }
457 }
458 return !result.error();
459}
460
461void cmWorkerPoolWorker::UVProcessStart(uv_async_t* handle)
462{

Callers

nothing calls this directly

Calls 8

moveFunction · 0.85
setupMethod · 0.80
waitMethod · 0.80
emptyMethod · 0.45
sendMethod · 0.45
errorMethod · 0.45
getMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected