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

Function kwsysProcess_New

Source/kwsys/ProcessUNIX.c:328–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326};
327
328kwsysProcess* kwsysProcess_New(void)
329{
330 /* Allocate a process control structure. */
331 kwsysProcess* cp = (kwsysProcess*)malloc(sizeof(kwsysProcess));
332 if (!cp) {
333 return 0;
334 }
335 memset(cp, 0, sizeof(kwsysProcess));
336
337 /* Share stdin with the parent process by default. */
338 cp->PipeSharedSTDIN = 1;
339
340 /* No native pipes by default. */
341 cp->PipeNativeSTDIN[0] = -1;
342 cp->PipeNativeSTDIN[1] = -1;
343 cp->PipeNativeSTDOUT[0] = -1;
344 cp->PipeNativeSTDOUT[1] = -1;
345 cp->PipeNativeSTDERR[0] = -1;
346 cp->PipeNativeSTDERR[1] = -1;
347
348 /* Set initial status. */
349 cp->State = kwsysProcess_State_Starting;
350
351 return cp;
352}
353
354void kwsysProcess_Delete(kwsysProcess* cp)
355{

Callers 2

runChildFunction · 0.70
RunProcessMethod · 0.70

Calls

no outgoing calls

Tested by 1

runChildFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…