mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +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;
|
file_t *file = fd < proc->fdcount ? proc->fd[fd].file : NULL;
|
||||||
if (file) {
|
if (file) {
|
||||||
proc->fd[fd].file = NULL;
|
proc->fd[fd].file = NULL;
|
||||||
proc->fdfirst = fd;
|
if (proc->fdfirst > fd)
|
||||||
|
proc->fdfirst = fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
spinlock_release(&proc->fdlock);
|
spinlock_release(&proc->fdlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user