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

Function runChild

Source/kwsys/testProcess.c:546–565  ·  view source on GitHub ↗

* Runs a child process and blocks until it returns. Arguments as follows: * * cmd = Command line to run. * state = Expected return value of kwsysProcess_GetState after exit. * exception = Expected return value of kwsysProcess_GetExitException. * value = Expected return value of kwsysProcess_GetExitValue. * share = Whether to share stdout/stderr chi

Source from the content-addressed store, hash-verified

544 * detachment occurs.
545 */
546int runChild(char const* cmd[], int state, int exception, int value, int share,
547 int output, int delay, double timeout, int poll, int repeat,
548 int disown, int createNewGroup, unsigned int interruptDelay)
549{
550 int result = 1;
551 kwsysProcess* kp = kwsysProcess_New();
552 if (!kp) {
553 fprintf(stderr, "kwsysProcess_New returned NULL!\n");
554 return 1;
555 }
556 while (repeat-- > 0) {
557 result = runChild2(kp, cmd, state, exception, value, share, output, delay,
558 timeout, poll, disown, createNewGroup, interruptDelay);
559 if (result) {
560 break;
561 }
562 }
563 kwsysProcess_Delete(kp);
564 return result;
565}
566
567int main(int argc, char const* argv[])
568{

Callers 5

test5Function · 0.85
test8Function · 0.85
test9Function · 0.85
test10Function · 0.85
mainFunction · 0.85

Calls 3

runChild2Function · 0.85
kwsysProcess_NewFunction · 0.70
kwsysProcess_DeleteFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…