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

Function kwsysProcessCleanupDescriptor

Source/kwsys/ProcessUNIX.c:1654–1663  ·  view source on GitHub ↗

Close the given file descriptor if it is open. Reset its value to -1. */

Source from the content-addressed store, hash-verified

1652
1653/* Close the given file descriptor if it is open. Reset its value to -1. */
1654static void kwsysProcessCleanupDescriptor(int* pfd)
1655{
1656 if (pfd && *pfd > 2) {
1657 /* Keep trying to close until it is not interrupted by a
1658 * signal. */
1659 while ((close(*pfd) < 0) && (errno == EINTR)) {
1660 }
1661 *pfd = -1;
1662 }
1663}
1664
1665static void kwsysProcessClosePipes(kwsysProcess* cp)
1666{

Callers 10

kwsysProcess_ExecuteFunction · 0.85
kwsysProcessWaitForPipeFunction · 0.85
kwsysProcess_KillFunction · 0.85
kwsysProcessCleanupFunction · 0.85
kwsysProcessClosePipesFunction · 0.85
kwsysProcessCreateFunction · 0.85
kwsysProcessDestroyFunction · 0.85
kwsysProcessesRemoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…