X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/763d5e6ad88ef3ba1cd1d7742d060e4f1e54c6b8..083bdba5eac4e283f6f492ed99ecbbb673f2567e:/lib/syscalls.c diff --git a/lib/syscalls.c b/lib/syscalls.c index a84e2eb..f05b644 100644 --- a/lib/syscalls.c +++ b/lib/syscalls.c @@ -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,