+ int i, maxhandles;
+
+ cur = VFS_int_GetUserHandles(Threads_GetPID(), 0);
+ if(!cur) return ; // Don't need to do anything if the current list is empty
+
+ ent = VFS_int_GetUserHandles(PID, 1);
+
+ maxhandles = *Threads_GetMaxFD();
+ memcpy(ent->Handles, cur->Handles, maxhandles*sizeof(tVFS_Handle));
+
+ for( i = 0; i < maxhandles; i ++ )
+ {
+ if(!cur->Handles[i].Node) continue;
+
+ if(ent->Handles[i].Node->Type->Reference)
+ ent->Handles[i].Node->Type->Reference(ent->Handles[i].Node);
+ }
+}
+
+void VFS_CloneHandlesFromList(int PID, int nFD, int FDs[])
+{
+ tUserHandles *ent;
+ tUserHandles *cur;
+ int i, maxhandles;