Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 70787 invoked from network); 16 Jul 2010 14:24:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 14:24:54 -0000 Received: (qmail 40418 invoked by uid 500); 16 Jul 2010 14:24:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 40325 invoked by uid 500); 16 Jul 2010 14:24: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 40318 invoked by uid 99); 16 Jul 2010 14:24:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 14:24:52 +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, 16 Jul 2010 14:24:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A802623889CB; Fri, 16 Jul 2010 14:23:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r964805 - /harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp Date: Fri, 16 Jul 2010 14:23:26 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100716142326.A802623889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hindessm Date: Fri Jul 16 14:23:26 2010 New Revision: 964805 URL: http://svn.apache.org/viewvc?rev=964805&view=rev Log: Apply patch from "[#HARMONY-6587] [drlvm] Maybe we should give one more try on the file given to a process". Modified: harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp Modified: harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp?rev=964805&r1=964804&r2=964805&view=diff ============================================================================== --- harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp (original) +++ harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/Runtime_lnx.cpp Fri Jul 16 14:23:26 2010 @@ -86,6 +86,7 @@ void JNICALL Java_java_lang_Runtime_0002 int lenargv = 0; lenargv = env->GetArrayLength(cmdarray); char *argv[lenargv+1]; + char *newArgv[lenargv+2]; for ( i = 0; i < lenargv; i++ ) { jo = env->GetObjectArrayElement((jobjectArray)((jobject)cmdarray), (jsize) i); strChain = env->GetStringUTFChars((jstring) jo, 0); @@ -182,11 +183,37 @@ void JNICALL Java_java_lang_Runtime_0002 } free(cmdDir); } - + + char *newArgv[lenargv+2]; if (lenEnvp == 0) { execvp(argv[0], argv); + if (errno == ENOEXEC) { + // give another try + for (i=0; i