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

Function test10

Source/kwsys/testProcess.c:330–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330static int test10(int argc, char const* argv[])
331{
332 /* Test Ctrl+C behavior: the root test program will send a Ctrl+C to this
333 process. Here, we start a child process that sleeps for a long time and
334 processes signals normally. However, this grandchild is created in a new
335 process group - ensuring that Ctrl+C we receive is sent to our process
336 groups. We make sure it exits anyway. */
337 int r;
338 char const* cmd[4];
339 (void)argc;
340 cmd[0] = argv[0];
341 cmd[1] = "run";
342 cmd[2] = "110";
343 cmd[3] = 0;
344 fprintf(stdout, "Output on stdout before grandchild test.\n");
345 fprintf(stderr, "Output on stderr before grandchild test.\n");
346 fflush(stdout);
347 fflush(stderr);
348 r =
349 runChild(cmd, kwsysProcess_State_Exception,
350 kwsysProcess_Exception_Interrupt, 0, 1, 1, 0, 30, 0, 1, 0, 1, 0);
351 fprintf(stdout, "Output on stdout after grandchild test.\n");
352 fprintf(stderr, "Output on stderr after grandchild test.\n");
353 fflush(stdout);
354 fflush(stderr);
355 return r;
356}
357
358static int test10_grandchild(int argc, char const* argv[])
359{

Callers 1

mainFunction · 0.85

Calls 1

runChildFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…