| Attached Files | patch1.txt [^] (1,101 bytes) 2009-05-14 13:40 [Show Content] [Hide Content]--- otherlibs/win32unix/select.c~ 2008-11-26 14:27:21.000000000 +0100
+++ otherlibs/win32unix/select.c 2009-05-14 11:48:23.940030400 +0200
@@ -401,6 +401,7 @@
/* Monitor a pipe for input */
void read_pipe_poll (HANDLE hStop, void *_data)
{
+ DWORD res;
DWORD event;
DWORD n;
LPSELECTQUERY iterQuery;
@@ -420,20 +421,20 @@
for (i = 0; i < lpSelectData->nQueriesCount; i++)
{
iterQuery = &(lpSelectData->aQueries[i]);
- if (check_error(
- lpSelectData,
- PeekNamedPipe(
+ res = PeekNamedPipe(
iterQuery->hFileDescr,
NULL,
0,
NULL,
&n,
- NULL) == 0))
+ NULL);
+ if (check_error(lpSelectData, (res == 0) &&
+ (GetLastError() != ERROR_BROKEN_PIPE)))
{
break;
};
- if (n > 0)
+ if ((n > 0) || (res == 0))
{
lpSelectData->EState = SELECT_STATE_SIGNALED;
select_data_result_add(lpSelectData, iterQuery->EMode, iterQuery->lpOrig);
|