mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
file: properly set fdfirst
This commit is contained in:
@@ -128,7 +128,8 @@ int fd_close(int fd) {
|
||||
file_t *file = fd < proc->fdcount ? proc->fd[fd].file : NULL;
|
||||
if (file) {
|
||||
proc->fd[fd].file = NULL;
|
||||
proc->fdfirst = fd;
|
||||
if (proc->fdfirst > fd)
|
||||
proc->fdfirst = fd;
|
||||
}
|
||||
|
||||
spinlock_release(&proc->fdlock);
|
||||
|
||||
Reference in New Issue
Block a user