You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2011/11/16 18:14:59 UTC
svn commit: r1202787 - in /commons/sandbox/runtime/trunk/src/main/native/os:
unix/exec.c win32/exec.c
Author: mturk
Date: Wed Nov 16 17:14:59 2011
New Revision: 1202787
URL: http://svn.apache.org/viewvc?rev=1202787&view=rev
Log:
Make sure shell is always provided
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=1202787&r1=1202786&r2=1202787&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 Wed Nov 16 17:14:59 2011
@@ -590,13 +590,14 @@ cleanup:
ACR_JNI_EXPORT(jobject, ExecImpl, init0)(JNI_STDARGS)
{
+ jstring shell = AcrNewJavaStringA(env, SHELL_PATH);
if (_clazzn.u == 1)
- return (*env)->NewObject(env, _clazzn.i, J4MID(0000));
+ return (*env)->NewObject(env, _clazzn.i, J4MID(0000), shell);
if (AcrLoadClass(env, &_clazzn, 0) == JNI_FALSE)
return 0;
R_LOAD_METHOD(0000, 0);
_clazzn.u = 1;
- return (*env)->NewObject(env, _clazzn.i, J4MID(0000), AcrNewJavaStringA(env, SHELL_PATH));
+ return (*env)->NewObject(env, _clazzn.i, J4MID(0000), shell);
}
ACR_UNX_EXPORT(jlong, PosixExec, exec0)(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=1202787&r1=1202786&r2=1202787&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 Wed Nov 16 17:14:59 2011
@@ -520,14 +520,13 @@ cleanup:
ACR_JNI_EXPORT(jobject, ExecImpl, init0)(JNI_STDARGS)
{
- jstring shell;
+ jstring shell = _procmgr_init(env);
if (_clazzn.u == 1)
- return (*env)->NewObject(env, _clazzn.i, J4MID(0000));
+ return (*env)->NewObject(env, _clazzn.i, J4MID(0000), shell);
if (AcrLoadClass(env, &_clazzn, 0) == JNI_FALSE)
return 0;
R_LOAD_METHOD(0000, 0);
_clazzn.u = 1;
- shell = _procmgr_init(env);
return (*env)->NewObject(env, _clazzn.i, J4MID(0000), shell);
}