chiark / gitweb /
missing EXTRA_DIST and path
[disorder] / lib / syscalls.c
index ddfcb463beb73c178a6b7439d688e1380c4af5d1..f05b644c37f825daf6a77c0ff895878c0015ed17 100644 (file)
@@ -66,6 +66,13 @@ void nonblock(int fd) {
                                        fcntl(fd, F_GETFL)) | O_NONBLOCK));
 }
 
+void blocking(int fd) {
+  mustnotbeminus1("fcntl F_SETFL",
+                 fcntl(fd, F_SETFL,
+                       mustnotbeminus1("fcntl F_GETFL",
+                                       fcntl(fd, F_GETFL)) & ~O_NONBLOCK));
+}
+
 void cloexec(int fd) {
   mustnotbeminus1("fcntl F_SETFD",
                  fcntl(fd, F_SETFD,
@@ -148,4 +155,3 @@ c-basic-offset:2
 comment-column:40
 End:
 */
-/* arch-tag:0be4384b4081d464d1a2fad746469d3d */