summary refs log tree commit diff
path: root/Src/Modules/tcp.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-08-10 13:44:12 +0100
committerPeter Stephenson <pws@zsh.org>2015-08-10 13:44:12 +0100
commitcbdb3cf9be7f0fb5a94e78c3f6fcd22805a57fab (patch)
tree3838043eb88fabfe917cd9407015b6d2f99c7844 /Src/Modules/tcp.c
parent9728f535e27548925b93981662844b3a2fe7dbfa (diff)
downloadzsh-cbdb3cf9be7f0fb5a94e78c3f6fcd22805a57fab.tar.gz
zsh-cbdb3cf9be7f0fb5a94e78c3f6fcd22805a57fab.tar.xz
zsh-cbdb3cf9be7f0fb5a94e78c3f6fcd22805a57fab.zip
not quite posted: check for error return before EINTR
Diffstat (limited to 'Src/Modules/tcp.c')
-rw-r--r--Src/Modules/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 304927313..bc1765da1 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -538,7 +538,7 @@ bin_ztcp(char *nam, char **args, Options ops, UNUSED(int func))
 	len = sizeof(sess->peer.in);
 	do {
 	    rfd = accept(lfd, (struct sockaddr *)&sess->peer.in, &len);
-	} while (errno == EINTR && !errflag);
+	} while (rfd < 0 && errno == EINTR && !errflag);
 
 	if (rfd == -1) {
 	    zwarnnam(nam, "could not accept connection: %e", errno);