case SYS_CLONE:
// Call clone system call
ret = Proc_Clone(Regs->Arg1);
- // Change user stack if a new stack address is passed
- if(ret == 0 && Regs->Arg2)
- Regs->StackPointer = Regs->Arg2;
break;
// -- Send a signal
CHECK_NUM_NONULL( &tmp[i], sizeof(char*) );
CHECK_STR_NONULL( tmp[i] );
}
+ if(ret == -1) break;
// Check EnvP also
// - EnvP can be NULL
if( Regs->Arg3 )
{
tmp = (char**)Regs->Arg3;
- //Log("tmp = %p", tmp);
+ CHECK_NUM_NONULL(tmp, sizeof(char**));
+ Log("tmp = %p", tmp);
for(i=0;tmp[i];i++) {
- CHECK_NUM_NULLOK( &tmp[i], sizeof(char*) );
+ CHECK_NUM_NONULL( &tmp[i], sizeof(char*) );
CHECK_STR_NONULL( tmp[i] );
}
+ if(ret == -1) break;
}
}
LEAVE('s', "Assuming 0");
// -- Debug
//#if DEBUG_BUILD
case SYS_DEBUG:
- LogF("Log: [%i] ", Threads_GetTID());
- LogF((char*)Regs->Arg1,
+ CHECK_STR_NONULL( (char*)Regs->Arg1 );
+ LogF("Log: %08lli [%i] ", now(), Threads_GetTID());
+ LogF((const char*)Regs->Arg1,
Regs->Arg2, Regs->Arg3, Regs->Arg4, Regs->Arg5, Regs->Arg6);
LogF("\r\n");
break;