if(Flags & CLONE_VM) {
tProcess *newproc, *oldproc;
oldproc = cur->Process;
- new->Process = malloc( sizeof(struct sProcess) );
+ new->Process = calloc( sizeof(struct sProcess), 1 );
newproc = new->Process;
newproc->PID = new->TID;
if( Flags & CLONE_PGID )
}
*ListTail = us;
}
- else {
+ else if( ListHead ) {
+ us->Next = *ListHead;
*ListHead = us;
}
+ else {
+ // Nothing
+ }
//if( Proc_ThreadSync(us) )
// return ;