| 308 | } |
| 309 | |
| 310 | void cmUVReadOnlyProcess::UVExit(uv_process_t* handle, int64_t exitStatus, |
| 311 | int termSignal) |
| 312 | { |
| 313 | auto& proc = *reinterpret_cast<cmUVReadOnlyProcess*>(handle->data); |
| 314 | if (proc.IsStarted() && !proc.IsFinished()) { |
| 315 | // Set error message on demand |
| 316 | proc.Result()->ExitStatus = exitStatus; |
| 317 | proc.Result()->TermSignal = termSignal; |
| 318 | if (proc.Result()->ErrorMessage.empty()) { |
| 319 | if (termSignal != 0) { |
| 320 | proc.Result()->ErrorMessage = cmStrCat( |
| 321 | "Process was terminated by signal ", proc.Result()->TermSignal); |
| 322 | } else if (exitStatus != 0) { |
| 323 | proc.Result()->ErrorMessage = cmStrCat( |
| 324 | "Process failed with return value ", proc.Result()->ExitStatus); |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | // Reset process handle |
| 329 | proc.UVProcess_.reset(); |
| 330 | // Try finish |
| 331 | proc.UVTryFinish(); |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void cmUVReadOnlyProcess::UVPipeOutData(cmUVPipeBuffer::DataRange data) const |
| 336 | { |
nothing calls this directly
no test coverage detected