harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r801917 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c
Date Fri, 07 Aug 2009 09:37:28 GMT
Author: odeakin
Date: Fri Aug  7 09:37:27 2009
New Revision: 801917

URL: http://svn.apache.org/viewvc?rev=801917&view=rev
Log:
Apply patch for HARMONY-6299 (ioctl() doesn't work on z/OS when the pipe is set up with pipe()
function)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c?rev=801917&r1=801916&r2=801917&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c Fri
Aug  7 09:37:27 2009
@@ -35,6 +35,7 @@
 
 #ifdef ZOS
 #define FD_BIAS 1000
+#include <sys/socket.h>
 #else
 #define FD_BIAS 0
 #endif /* ZOS */
@@ -137,14 +138,25 @@
   int error = 0;
   int writeRC = 0;
 
-  /* Build the new io pipes (in/out/err) */
-  if (pipe(newFD[0]) == -1) goto error;
-  if (pipe(newFD[1]) == -1) goto error;
-  if (pipe(newFD[2]) == -1) goto error;
-
-  /* pipes for synchronization */
-  if (pipe(forkedChildIsRunning) == -1) goto error;
-  if (pipe(execvFailure) == -1) goto error;
+  #ifdef ZOS
+    /* Build the new io pipes (in/out/err) */
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[0]) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[1]) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[2]) == -1) goto error;
+
+    /* pipes for synchronization */
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,forkedChildIsRunning) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,execvFailure) == -1) goto error;       
+  #else
+     /* Build the new io pipes (in/out/err) */
+    if (pipe(newFD[0]) == -1) goto error;
+    if (pipe(newFD[1]) == -1) goto error;
+    if (pipe(newFD[2]) == -1) goto error;
+
+    /* pipes for synchronization */
+    if (pipe(forkedChildIsRunning) == -1) goto error;
+    if (pipe(execvFailure) == -1) goto error;  
+  #endif /* ZOS */
 
   cmd = command[0];
 



Mime
View raw message