VFS object auto cleanup

This commit is contained in:
2025-09-06 09:31:05 +02:00
parent c31c00e8cd
commit b89882e1cf
2 changed files with 20 additions and 0 deletions

View File

@ -194,6 +194,13 @@ void proc_reaper(void) {
LL_REMOVE(PROCS.procs, zombie);
for (size_t i = 0; i < zombie->vobjcnt; i++) {
if (zombie->vobjs[i] != NULL) {
vfs_close(zombie->vobjs[i]);
zombie->vobjs[i] = NULL;
}
}
pmm_free((uintptr_t)(zombie->platformdata.kstack - PROC_STACKSIZE), PROC_STACKBLOCKS);
if (!zombie->kern) {