From 631fdbefc89a6202c5b8e2bf0e15a6ca7df809ef Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 20 Sep 2018 02:02:28 +0200 Subject: newlib and pipes --- kernel/syscalls.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'kernel/syscalls.c') 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; } -- cgit v1.2.3