commit 22314c3157a69b08b71852cb928b9c4f8f98322f parent dd6895e2dcbe262482f67f569b4d6cdc795150a4 Author: Drew DeVault <sir@cmpwn.com> Date: Fri, 6 May 2022 18:00:45 +0200 io: improve io::close docs Signed-off-by: Drew DeVault <sir@cmpwn.com> Diffstat:
M | io/handle.ha | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/io/handle.ha b/io/handle.ha @@ -37,7 +37,11 @@ export fn write(h: handle, buf: const []u8) (size | error) = { }; // Closes a [[handle]]. No further operations against this handle are permitted -// after calling this function. +// after calling this function. Closing a file handle can fail only under +// certain conditions (for example, closing a file twice, or an interrupted +// syscall). However, the user should not attempt to close the file again on +// failure - at best the user should print a diagnostic message and move on. See +// close(2) for details. export fn close(h: handle) (void | error) = { match (h) { case let fd: file =>