summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/proc.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2015-12-05 13:18:24 +0000
committerclaudio <claudio@openbsd.org>2015-12-05 13:18:24 +0000
commit55b9e3330fb3ad327f072198ede489f4c176d465 (patch)
tree14188ad5bfa5499b923593fbba7a6ec33c6b0de3 /usr.bin/tmux/proc.c
parentEAGAIN handling for imsg_read. OK henning@ benno@ (diff)
downloadwireguard-openbsd-55b9e3330fb3ad327f072198ede489f4c176d465.tar.xz
wireguard-openbsd-55b9e3330fb3ad327f072198ede489f4c176d465.zip
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'usr.bin/tmux/proc.c')
-rw-r--r--usr.bin/tmux/proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/proc.c b/usr.bin/tmux/proc.c
index c0b27755ef0..1f3ff96e631 100644
--- a/usr.bin/tmux/proc.c
+++ b/usr.bin/tmux/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.6 2015/11/24 21:32:36 nicm Exp $ */
+/* $OpenBSD: proc.c,v 1.7 2015/12/05 13:18:24 claudio Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -61,7 +61,8 @@ proc_event_cb(__unused int fd, short events, void *arg)
struct imsg imsg;
if (!(peer->flags & PEER_BAD) && (events & EV_READ)) {
- if ((n = imsg_read(&peer->ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&peer->ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0) {
peer->dispatchcb(NULL, peer->arg);
return;
}