diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 14:09:09 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 14:09:09 +0100 |
commit | 0ee2b5cd142d16d94c73a97951b7f19ed177e64c (patch) | |
tree | d46c6144a92eed01c1b43a610ac875a3a0f35876 | |
parent | m (diff) | |
download | sat-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 '')
-rw-r--r-- | src/client.c | 2 |
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); |