// === PROTOTYPES ===
int Binary_int_CacheArgs(const char **Path, const char ***ArgV, const char ***EnvP, void *DestBuffer);
+ int Proc_int_Execve(const char *File, const char **ArgV, const char **EnvP, int DataSize, bool bClearUser);
tVAddr Binary_Load(const char *Path, tVAddr *EntryPoint);
tBinary *Binary_GetInfo(tMount MountID, tInode InodeID);
tVAddr Binary_MapIn(tBinary *Binary, const char *Path, tVAddr LoadMin, tVAddr LoadMax);
VFS_RestoreHandles(nFD, handles);
VFS_FreeSavedHandles(nFD, handles);
// Frees cachebuf
- Proc_Execve(Binary, ArgV, EnvP, size);
+ Proc_int_Execve(Binary, ArgV, EnvP, size, 0);
for(;;);
}
if( ret == -1 )
* \note Called Proc_ for historical reasons
*/
int Proc_Execve(const char *File, const char **ArgV, const char **EnvP, int DataSize)
+{
+ return Proc_int_Execve(File, ArgV, EnvP, DataSize, 1);
+}
+
+int Proc_int_Execve(const char *File, const char **ArgV, const char **EnvP, int DataSize, bool bClearUser)
{
void *cachebuf;
tVAddr entry;
// --- Clear User Address space
// NOTE: This is a little roundabout, maybe telling ClearUser to not touch the
// PPD area would be a better idea.
+ if( bClearUser )
{
int nfd = *Threads_GetMaxFD();
void *handles;