浏览代码

remove bogus extra logic for close cancellability

like all other syscalls, close should return to the caller if and only
if it successfully performed its action. it is necessary that the
application be able to determine whether the close succeeded.
Rich Felker 14 年之前
父节点
当前提交
61b56a8d21
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/unistd/close.c

+ 1 - 3
src/unistd/close.c

@@ -4,7 +4,5 @@
 
 
 int close(int fd)
 int close(int fd)
 {
 {
-	int ret = syscall_cp(SYS_close, fd);
-	if (libc.testcancel) libc.testcancel();
-	return ret;
+	return syscall_cp(SYS_close, fd);
 }
 }