git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode - More hackery to get glib compiling
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
binary.c
diff --git
a/KernelLand/Kernel/binary.c
b/KernelLand/Kernel/binary.c
index
3dab6a9
..
5170dac
100644
(file)
--- a/
KernelLand/Kernel/binary.c
+++ b/
KernelLand/Kernel/binary.c
@@
-231,23
+231,19
@@
int Proc_int_Execve(const char *File, const char **ArgV, const char **EnvP, int
}
// --- Get argc
}
// --- Get argc
- for( argc = 0; ArgV && ArgV[argc]; argc ++ );
+ for( argc = 0; ArgV && ArgV[argc]; argc ++ )
+ ;
// --- Set Process Name
Threads_SetName(File);
// --- Clear User Address space
// --- Set Process Name
Threads_SetName(File);
// --- 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 )
{
if( bClearUser )
{
- int nfd = *Threads_GetMaxFD();
- void *handles;
- handles = VFS_SaveHandles(nfd, NULL);
- VFS_CloseAllUserHandles();
+ // MM_ClearUser should preserve handles
MM_ClearUser();
MM_ClearUser();
- VFS_RestoreHandles(nfd, handles);
-
VFS_FreeSavedHandles(nfd, handles
);
+ // - NOTE: Not a reliable test, but helps for now
+
ASSERTC( VFS_IOCtl(0, 0, NULL), !=, -1
);
}
// --- Load new binary
}
// --- Load new binary
@@
-334,6
+330,8
@@
tVAddr Binary_Load(const char *Path, tVAddr *EntryPoint)
if(pBinary->Interpreter) {
tVAddr start;
if( Binary_Load(pBinary->Interpreter, &start) == 0 ) {
if(pBinary->Interpreter) {
tVAddr start;
if( Binary_Load(pBinary->Interpreter, &start) == 0 ) {
+ Log_Error("Binary", "Can't load interpeter '%s' for '%s'",
+ pBinary->Interpreter, Path);
LEAVE('x', 0);
return 0;
}
LEAVE('x', 0);
return 0;
}
UCC
git Repository :: git.ucc.asn.au