wrowe 02/05/29 22:25:00
Modified: file_io/win32 open.c pipe.c
Log:
Modify our pipe semantics to match linux, such that at least 65536 bytes
may be written to the pipe before it deadlocks. Matches our 1.3 fix.
PR: 8179
Revision Changes Path
1.101 +1 -0 apr/file_io/win32/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/open.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- open.c 20 Mar 2002 08:54:43 -0000 1.100
+++ open.c 30 May 2002 05:25:00 -0000 1.101
@@ -519,6 +519,7 @@
(*file)->filehand = *thefile;
(*file)->ungetchar = -1; /* no char avail */
(*file)->flags;
+ (*file)->pipe;
return APR_SUCCESS;
}
1.44 +4 -4 apr/file_io/win32/pipe.c
Index: pipe.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/pipe.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- pipe.c 20 Mar 2002 08:54:43 -0000 1.43
+++ pipe.c 30 May 2002 05:25:00 -0000 1.44
@@ -122,7 +122,7 @@
(*out)->dataRead = 0;
(*out)->direction = 0;
- if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 0)) {
+ if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 65536)) {
return apr_get_os_error();
}
@@ -214,8 +214,8 @@
dwOpenMode,
dwPipeMode,
1, //nMaxInstances,
- 8182, //nOutBufferSize,
- 8192, //nInBufferSize,
+ 0, //nOutBufferSize,
+ 65536, //nInBufferSize,
1, //nDefaultTimeOut,
&sa);
@@ -237,7 +237,7 @@
}
else {
/* Pipes on Win9* are blocking. Live with it. */
- if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 0)) {
+ if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 65536)) {
return apr_get_os_error();
}
}