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

Function kwsysProcessSetupOutputPipeNative

Source/kwsys/ProcessUNIX.c:1965–1981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1963}
1964
1965static int kwsysProcessSetupOutputPipeNative(int* p, int des[2])
1966{
1967 /* Close the existing descriptor. */
1968 kwsysProcessCleanupDescriptor(p);
1969
1970 /* Set close-on-exec flag on the pipe's ends. The proper end will
1971 be dup2-ed into the standard descriptor number after fork but
1972 before exec. */
1973 if ((fcntl(des[0], F_SETFD, FD_CLOEXEC) < 0) ||
1974 (fcntl(des[1], F_SETFD, FD_CLOEXEC) < 0)) {
1975 return 0;
1976 }
1977
1978 /* Assign the replacement descriptor. */
1979 *p = des[1];
1980 return 1;
1981}
1982
1983/* Get the time at which either the process or user timeout will
1984 expire. Returns 1 if the user timeout is first, and 0 otherwise. */

Callers 1

kwsysProcess_ExecuteFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…