diff options
| author | Miguel <m.i@gmx.at> | 2018-09-20 02:02:28 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-20 02:02:28 +0200 |
| commit | 631fdbefc89a6202c5b8e2bf0e15a6ca7df809ef (patch) | |
| tree | d0cd13fcb6590c6d3bf88193ca344521ee3e3e78 /kernel/syscalls.c | |
| parent | 1e08b64b43bf9c50b644da3f76d5a8bcc73f62da (diff) | |
newlib and pipes
Diffstat (limited to 'kernel/syscalls.c')
| -rw-r--r-- | kernel/syscalls.c | 9 |
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; } |
