diff options
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r-- | usr.bin/tmux/server.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 2d71a474087..0b211388b8a 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.99 2011/01/01 01:12:09 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.100 2011/01/08 01:52:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -74,7 +74,7 @@ server_create_socket(void) struct sockaddr_un sa; size_t size; mode_t mask; - int fd, mode; + int fd; memset(&sa, 0, sizeof sa); sa.sun_family = AF_UNIX; @@ -95,11 +95,7 @@ server_create_socket(void) if (listen(fd, 16) == -1) fatal("listen failed"); - - if ((mode = fcntl(fd, F_GETFL)) == -1) - fatal("fcntl failed"); - if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1) - fatal("fcntl failed"); + setblocking(fd, 0); server_update_socket(); |