MCPcopy Create free account
hub / github.com/ImageEngine/cortex / fixSocketFlags

Function fixSocketFlags

src/IECoreImage/DisplayDriverServer.cpp:85–94  ·  view source on GitHub ↗

Set the FD_CLOEXEC flag for the given socket descriptor, so that it will not exist on child processes.*/

Source from the content-addressed store, hash-verified

83
84/* Set the FD_CLOEXEC flag for the given socket descriptor, so that it will not exist on child processes.*/
85static void fixSocketFlags( int socketDesc )
86{
87#ifndef _MSC_VER
88 int oldflags = fcntl (socketDesc, F_GETFD, 0);
89 if ( oldflags >= 0 )
90 {
91 fcntl( socketDesc, F_SETFD, oldflags | FD_CLOEXEC );
92 }
93#endif
94}
95
96static DisplayDriverServer::PortRange g_portRange(
97 std::numeric_limits<DisplayDriverServer::Port>::min(),

Callers 2

DisplayDriverServerMethod · 0.85
startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected