diff options
author | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-10-09 23:39:39 +0100 |
commit | 767ee84d3465b6d244a9108de5c167a9ab866df9 (patch) | |
tree | 69b14ef6a62d7f133298a21d2ad6046f130b7801 /serverloop.c | |
parent | ddeaf9ee7d5c6612b88f1c4a83fc6fbccb93bf60 (diff) | |
parent | efef12825b9582c1710da3b7e50135870963d4f4 (diff) |
New upstream release (8.1p1)
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serverloop.c b/serverloop.c index d7b04b37c..ea468c954 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.215 2019/03/27 09:29:14 djm Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.216 2019/06/28 13:35:04 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -123,7 +123,7 @@ static int notify_pipe[2]; | |||
123 | static void | 123 | static void |
124 | notify_setup(void) | 124 | notify_setup(void) |
125 | { | 125 | { |
126 | if (pipe(notify_pipe) < 0) { | 126 | if (pipe(notify_pipe) == -1) { |
127 | error("pipe(notify_pipe) failed %s", strerror(errno)); | 127 | error("pipe(notify_pipe) failed %s", strerror(errno)); |
128 | } else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) || | 128 | } else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) || |
129 | (fcntl(notify_pipe[1], F_SETFD, FD_CLOEXEC) == -1)) { | 129 | (fcntl(notify_pipe[1], F_SETFD, FD_CLOEXEC) == -1)) { |
@@ -328,7 +328,7 @@ process_input(struct ssh *ssh, fd_set *readset, int connection_in) | |||
328 | verbose("Connection closed by %.100s port %d", | 328 | verbose("Connection closed by %.100s port %d", |
329 | ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); | 329 | ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); |
330 | return -1; | 330 | return -1; |
331 | } else if (len < 0) { | 331 | } else if (len == -1) { |
332 | if (errno != EINTR && errno != EAGAIN && | 332 | if (errno != EINTR && errno != EAGAIN && |
333 | errno != EWOULDBLOCK) { | 333 | errno != EWOULDBLOCK) { |
334 | verbose("Read error from remote host " | 334 | verbose("Read error from remote host " |
@@ -384,7 +384,7 @@ collect_children(struct ssh *ssh) | |||
384 | if (child_terminated) { | 384 | if (child_terminated) { |
385 | debug("Received SIGCHLD."); | 385 | debug("Received SIGCHLD."); |
386 | while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || | 386 | while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || |
387 | (pid < 0 && errno == EINTR)) | 387 | (pid == -1 && errno == EINTR)) |
388 | if (pid > 0) | 388 | if (pid > 0) |
389 | session_close_by_pid(ssh, pid, status); | 389 | session_close_by_pid(ssh, pid, status); |
390 | child_terminated = 0; | 390 | child_terminated = 0; |