commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1097548 - in /commons/sandbox/runtime/trunk/src/main/native/os: unix/exec.c win32/exec.c
Date Thu, 28 Apr 2011 17:01:38 GMT
Author: mturk
Date: Thu Apr 28 17:01:37 2011
New Revision: 1097548

URL: http://svn.apache.org/viewvc?rev=1097548&view=rev
Log:
Use ansi strings on posix

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/exec.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c?rev=1097548&r1=1097547&r2=1097548&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c Thu Apr 28 17:01:37 2011
@@ -584,7 +584,7 @@ ACR_JNI_EXPORT(jobject, ExecImpl, init0)
         return 0;
     R_LOAD_METHOD(0000, 0);
     _clazzn.u = 1;
-    return (*env)->NewObject(env, _clazzn.i, J4MID(0000), AcrNewJavaStringW(env, SHELL_PATH));
+    return (*env)->NewObject(env, _clazzn.i, J4MID(0000), AcrNewJavaStringA(env, SHELL_PATH));
 }
 
 ACR_UNX_EXPORT(jlong, PosixExec, run0)(JNI_STDARGS, jstring executable,

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/exec.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/exec.c?rev=1097548&r1=1097547&r2=1097548&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/exec.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/exec.c Thu Apr 28 17:01:37 2011
@@ -251,8 +251,13 @@ static int _run_exec(const wchar_t *exec
         SetHandleInformation(GetStdHandle(STD_ERROR_HANDLE),
                              stdhinfo[2], stdhinfo[2]);
     LeaveCriticalSection(&_procmgr_lock);
-    if (rc != 0)
+    if (rc != 0) {
+        /* Anything bellow this point is child error.
+         * This mimicks the posix fork behavior */
+         */
+        exitwhy = ACR_CHILD_ERROR;
         goto cleanup;
+    }
     pid = pi.dwProcessId;
     /* Close our side of the pipes
      */
@@ -511,8 +516,6 @@ cleanup:
         SAFE_CLOSE_HANDLE(overlap[i].o.hEvent);
     }
     *retval = rc;
-    if (ACR_STATUS_IS_ENOENT(rc))
-        exitwhy = ACR_CHILD_ERROR;
     return exitwhy;
 }
 



Mime
View raw message