about summary refs log tree commit diff homepage
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.c b/server.c
index ba45b30..b2b651b 100644
--- a/server.c
+++ b/server.c
@@ -350,6 +350,7 @@ int main() {
 		if (!event.udata) {
 			int fd = accept(server, NULL, NULL);
 			if (fd < 0) err(EX_IOERR, "accept");
+			fcntl(fd, F_SETFL, O_NONBLOCK);
 
 			int on = 1;
 			error = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));