From 0ee2b5cd142d16d94c73a97951b7f19ed177e64c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 14:09:09 +0100 Subject: clients test socket with shared lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client.c b/src/client.c index 69f4edd..8912f5b 100644 --- a/src/client.c +++ b/src/client.c @@ -71,7 +71,7 @@ send_command(enum command cmd, size_t n, const char *restrict msg) if (fd == -1) { t (errno != ENOENT); } else { - if (flock(fd, LOCK_EX | LOCK_NB) == -1) + if (flock(fd, LOCK_SH | LOCK_NB) == -1) t (start = 0, errno != EWOULDBLOCK); else flock(fd, LOCK_UN); -- cgit v1.2.3-70-g09d2