Author: tellison
Date: Thu Mar 2 07:40:45 2006
New Revision: 382415
URL: http://svn.apache.org/viewcvs?rev=382415&view=rev
Log:
Fix for HARMONY-116 (strange exec behaviour with harmony vme/classlib)
Modified:
incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/procimpl.c
Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/procimpl.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/procimpl.c?rev=382415&r1=382414&r2=382415&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/procimpl.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/procimpl.c Thu Mar
2 07:40:45 2006
@@ -22,6 +22,8 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <unistd.h>
+extern char **environ;
+
#include <sys/wait.h>
#include "procimpl.h"
@@ -126,10 +128,10 @@
chdir (dir);
/* ===try to perform the execv : on success, it does not return ===== */
- if (envSize == 0)
- rc = execvp (cmd, command);
- else
- rc = execve (cmd, command, env);
+ if (envSize != 0)
+ environ = env;
+
+ rc = execvp (cmd, command);
/* ===================================================== */
/* if we get here ==> tell the parent that the execv failed ! */
|