MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / forkThread

Function forkThread

src/remote/inet.cpp:1981–2008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1979
1980
1981THREAD_ENTRY_DECLARE forkThread(THREAD_ENTRY_PARAM arg)
1982{
1983 const USHORT flag = (USHORT)(U_IPTR) arg;
1984
1985 while (!INET_shutting_down)
1986 {
1987 if (WaitForSingleObject(forkEvent, INFINITE) != WAIT_OBJECT_0)
1988 break;
1989
1990 while (!INET_shutting_down)
1991 {
1992 SOCKET s = 0;
1993 { // scope
1994 MutexLockGuard forkGuard(forkMutex, FB_FUNCTION);
1995
1996 if (!forkSockets || forkSockets->getCount() == 0)
1997 break;
1998
1999 s = (*forkSockets)[0];
2000 forkSockets->remove((FB_SIZE_T) 0);
2001 }
2002 fork(s, flag);
2003 SOCLOSE(s);
2004 }
2005 }
2006
2007 return 0;
2008}
2009
2010
2011// Windows does not have an inet_aton function.

Callers

nothing calls this directly

Calls 4

forkFunction · 0.85
SOCLOSEFunction · 0.85
getCountMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected