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

Function kwsysProcess_Delete

Source/kwsys/ProcessUNIX.c:354–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void kwsysProcess_Delete(kwsysProcess* cp)
355{
356 /* Make sure we have an instance. */
357 if (!cp) {
358 return;
359 }
360
361 /* If the process is executing, wait for it to finish. */
362 if (cp->State == kwsysProcess_State_Executing) {
363 if (cp->Detached) {
364 kwsysProcess_Disown(cp);
365 } else {
366 kwsysProcess_WaitForExit(cp, 0);
367 }
368 }
369
370 /* Free memory. */
371 kwsysProcess_SetCommand(cp, 0);
372 kwsysProcess_SetWorkingDirectory(cp, 0);
373 kwsysProcess_SetPipeFile(cp, kwsysProcess_Pipe_STDIN, 0);
374 kwsysProcess_SetPipeFile(cp, kwsysProcess_Pipe_STDOUT, 0);
375 kwsysProcess_SetPipeFile(cp, kwsysProcess_Pipe_STDERR, 0);
376 free(cp->CommandExitCodes);
377 free(cp->ProcessResults);
378 free(cp);
379}
380
381int kwsysProcess_SetCommand(kwsysProcess* cp, char const* const* command)
382{

Callers 2

runChildFunction · 0.70
RunProcessMethod · 0.70

Calls 5

kwsysProcess_DisownFunction · 0.70
kwsysProcess_WaitForExitFunction · 0.70
kwsysProcess_SetCommandFunction · 0.70
kwsysProcess_SetPipeFileFunction · 0.70

Tested by 1

runChildFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…