FastCGI Developer's Kit README
------------------------------
- $Id: README,v 1.15 2002/02/19 00:45:54 robs Exp $
+ $Id: README,v 1.16 2002/02/23 21:22:01 robs Exp $
Copyright (c) 1996 Open Market, Inc.
See the file "LICENSE.TERMS" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
2.2.3
-----
+ *) [WIN32] Eliminate the (partial and broken) use of OverlappedIO - this
+ was causing a loose spin in acceptNamedPipe().
+
*) Fix a bug that caused an assert to pop when an async file descriptor was
numbered greater than 16. Kevin Eye [eye@buffalo.edu]
* significantly more enjoyable.)
*/
#ifndef lint
-static const char rcsid[] = "$Id: os_win32.c,v 1.27 2002/02/16 14:45:30 robs Exp $";
+static const char rcsid[] = "$Id: os_win32.c,v 1.28 2002/02/23 21:22:02 robs Exp $";
#endif /* not lint */
#define WIN32_LEAN_AND_MEAN
// XXX This should be a DESCRIPTOR
static HANDLE hListen = INVALID_HANDLE_VALUE;
-static OVERLAPPED listenOverlapped;
static BOOLEAN libInitialized = FALSE;
/*
if (SetNamedPipeHandleState(hListen, &pipeMode, NULL, NULL))
{
listenType = FD_PIPE_SYNC;
- listenOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
}
else
{
strcat(pipePath, bindPath);
hListenPipe = CreateNamedPipe(pipePath,
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
+ PIPE_ACCESS_DUPLEX,
PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_READMODE_BYTE,
PIPE_UNLIMITED_INSTANCES,
4096, 4096, 0, NULL);
{
int ipcFd = -1;
- if (! ConnectNamedPipe(hListen, &listenOverlapped))
+ if (! ConnectNamedPipe(hListen, NULL))
{
switch (GetLastError())
{
case ERROR_IO_PENDING:
- // Wait for a connection to complete.
-
- while (WaitForSingleObject(listenOverlapped.hEvent,
- ACCEPT_TIMEOUT) == WAIT_TIMEOUT)
- {
- if (shutdownPending)
- {
- OS_LibShutdown();
- return -1;
- }
- }
-
- break;
+ // The NamedPipe was opened with an Overlapped structure
+ // and there is a pending io operation. mod_fastcgi
+ // did this in 2.2.12 (fcgi_pm.c v1.52).
case ERROR_PIPE_LISTENING: