aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 14:09:09 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 14:09:09 +0100
commit0ee2b5cd142d16d94c73a97951b7f19ed177e64c (patch)
treed46c6144a92eed01c1b43a610ac875a3a0f35876 /src/client.c
parentm (diff)
downloadsat-0ee2b5cd142d16d94c73a97951b7f19ed177e64c.tar.gz
sat-0ee2b5cd142d16d94c73a97951b7f19ed177e64c.tar.bz2
sat-0ee2b5cd142d16d94c73a97951b7f19ed177e64c.tar.xz
clients test socket with shared lock
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c2
1 files changed, 1 insertions, 1 deletions
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);