Explorar o código

!102 修正对用户态关闭fd 3时的系统调用实现
Merge pull request !102 from jesven/fix_close_fd3

bernard %!s(int64=5) %!d(string=hai) anos
pai
achega
2d8042fd9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      components/lwp/lwp_syscall.c

+ 1 - 1
components/lwp/lwp_syscall.c

@@ -473,7 +473,7 @@ int sys_open(const char *name, int flag, ...)
 /* syscall: "close" ret: "int" args: "int" */
 /* syscall: "close" ret: "int" args: "int" */
 int sys_close(int fd)
 int sys_close(int fd)
 {
 {
-    if ((0 <= fd) && (fd <= 2))
+    if ((0 <= fd) && (fd <= DFS_FD_OFFSET))
     {
     {
         return 0;
         return 0;
     }
     }