summaryrefslogtreecommitdiff
path: root/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/syscalls.c')
-rw-r--r--kernel/syscalls.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index 4f6508a..3b599c0 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -348,17 +348,14 @@ uint32_t syscall_exit(int pid)
//
int syscall_close(int file,int none1,int none2)
{
-
- //if(file!=0&&file!=1&&file!=2)
- // kpanic("unhandled syscall: close");
-
- return -1;
+ if(file<3)return 0;
+ fd_close(&fds[file]);
+ return 0;
}
// TODO: check if file is termminal!
int syscall_isatty(int file,int none1,int none2)
{
-
return 1;
}