1.1 --- a/lib/posix/io.py Thu Dec 08 23:36:43 2016 +0100
1.2 +++ b/lib/posix/io.py Thu Dec 08 23:50:56 2016 +0100
1.3 @@ -47,7 +47,13 @@
1.4 "Write string 's' to the file."
1.5
1.6 check_string(s)
1.7 - write(self.fd, s)
1.8 + return write(self.fd, s)
1.9 +
1.10 + def close(self):
1.11 +
1.12 + "Close the file."
1.13 +
1.14 + close(self.fd)
1.15
1.16 class sysstream(filestream):
1.17
1.18 @@ -68,7 +74,12 @@
1.19
1.20 # Input/output functions.
1.21
1.22 -def close(fd): pass
1.23 +def close(fd):
1.24 +
1.25 + "Close the file descriptor 'fd'."
1.26 +
1.27 + native._close(fd)
1.28 +
1.29 def closerange(fd_low, fd_high): pass
1.30 def dup(fd): pass
1.31 def dup2(old_fd, new_fd): pass
1.32 @@ -127,7 +138,7 @@
1.33
1.34 check_int(fd)
1.35 check_string(s)
1.36 - native._write(fd, s)
1.37 + return native._write(fd, s)
1.38
1.39 # Constants.
1.40