summaryrefslogtreecommitdiff
path: root/doc/libstddjb/djbunix.html
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-11-20 15:22:48 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-11-20 15:22:48 +0000
commitcc31550d01415181e70150ad3e9043d049b07a09 (patch)
tree8631f84ba6390798f72576552f2c1b869e64ff3b /doc/libstddjb/djbunix.html
parent155f489a29ecc7d7b9b66e435739e69f40653562 (diff)
downloadskalibs-cc31550d01415181e70150ad3e9043d049b07a09.tar.xz
Add fd_shutdown()
Diffstat (limited to 'doc/libstddjb/djbunix.html')
-rw-r--r--doc/libstddjb/djbunix.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html
index 9a921de..e70fe4f 100644
--- a/doc/libstddjb/djbunix.html
+++ b/doc/libstddjb/djbunix.html
@@ -192,6 +192,16 @@ Returns 1 if it succeeds and 0 if it fails.
</p>
<p>
+<code> void fd_shutdown (int fd, int w) </code> <br />
+Shuts down socket <em>fd</em>, for reading if <em>w</em> is zero,
+and for writing otherwise. Does not return an error code; does
+not modify errno. This is just a call to
+<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/shutdown.html">shutdown()</a>
+with errno saved, used essentially to isolate application code from
+<tt>sys/socket.h</tt> which is a portability nightmare.
+</p>
+
+<p>
<code> int lock_ex (int fd) </code> <br />
Gets an exclusive advisory lock on <em>fd</em>. <em>fd</em> must point to
a regular file, open for writing. Blocks until the lock can be obtained.