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

Function kwsysProcessChildErrorExit

Source/kwsys/ProcessUNIX.c:2324–2338  ·  view source on GitHub ↗

When the child process encounters an error before its program is invoked, this is called to report the error to the parent and exit. */

Source from the content-addressed store, hash-verified

2322 invoked, this is called to report the error to the parent and
2323 exit. */
2324static void kwsysProcessChildErrorExit(int errorPipe)
2325{
2326 /* Construct the error message. */
2327 char buffer[KWSYSPE_PIPE_BUFFER_SIZE];
2328 kwsysProcess_ssize_t result;
2329 strncpy(buffer, strerror(errno), KWSYSPE_PIPE_BUFFER_SIZE);
2330 buffer[KWSYSPE_PIPE_BUFFER_SIZE - 1] = '\0';
2331
2332 /* Report the error to the parent through the special pipe. */
2333 result = write(errorPipe, buffer, strlen(buffer));
2334 (void)result;
2335
2336 /* Terminate without cleanup. */
2337 _exit(1);
2338}
2339
2340/* Restores all signal handlers to their default values. */
2341static void kwsysProcessRestoreDefaultSignalHandlers(void)

Callers 1

kwsysProcessCreateFunction · 0.85

Calls 2

writeFunction · 0.85
strlenFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…