changeset 20:1d12b16c7df9

6631966: (process) Raise Windows pipe buffer size an extra 24 bytes (win) Reviewed-by: alanb, iris
author martin
date Mon, 10 Mar 2008 14:32:50 -0700
parents 7fb2ca1b52c8
children b8fc7b5498dd
files src/windows/native/java/lang/ProcessImpl_md.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/java/lang/ProcessImpl_md.c	Sun Mar 09 21:56:42 2008 -0700
+++ b/src/windows/native/java/lang/ProcessImpl_md.c	Mon Mar 10 14:32:50 2008 -0700
@@ -33,7 +33,12 @@
 #include <windows.h>
 #include <io.h>
 
-#define PIPE_SIZE 4096
+/* We try to make sure that we can read and write 4095 bytes (the
+ * fixed limit on Linux) to the pipe on all operating systems without
+ * deadlock.  Windows 2000 inexplicably appears to need an extra 24
+ * bytes of slop to avoid deadlock.
+ */
+#define PIPE_SIZE (4096+24)
 
 char *
 extractExecutablePath(JNIEnv *env, char *source)