summaryrefslogtreecommitdiffstats
path: root/sftp.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-01-05 06:49:13 +0100
committerDamien Miller <djm@mindrot.org>2023-01-06 06:21:38 +0100
commit8c7c69d32375d2f3ce9da0109c9bffc560842316 (patch)
tree2d8a8fd12927b15c93850123899b52cc9bfeb74b /sftp.c
parentupstream: regression test for PermitRemoteOpen (diff)
downloadopenssh-8c7c69d32375d2f3ce9da0109c9bffc560842316.tar.xz
openssh-8c7c69d32375d2f3ce9da0109c9bffc560842316.zip
upstream: suppress "Connection closed" message when in quiet mode
OpenBSD-Commit-ID: 8a3ab7176764da55f60bfacfeae9b82d84e3908f
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sftp.c b/sftp.c
index 8a57c1a00..b3616c15c 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.224 2022/12/16 06:52:48 jmc Exp $ */
+/* $OpenBSD: sftp.c,v 1.225 2023/01/05 05:49:13 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -275,7 +275,8 @@ sigchld_handler(int sig)
while ((pid = waitpid(sshpid, NULL, WNOHANG)) == -1 && errno == EINTR)
continue;
if (pid == sshpid) {
- (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
+ if (!quiet)
+ (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
sshpid = -1;
}