Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 4944 invoked from network); 7 Aug 2009 09:37:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 09:37:46 -0000 Received: (qmail 58741 invoked by uid 500); 7 Aug 2009 09:37:53 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 58689 invoked by uid 500); 7 Aug 2009 09:37:53 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 58680 invoked by uid 99); 7 Aug 2009 09:37:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 09:37:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 09:37:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 047E2238889C; Fri, 7 Aug 2009 09:37:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: odeakin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090807093729.047E2238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 #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];