From f2e3f6b690c5e673c2d8f5a7df3ab15dd0e59cca Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 5 Jan 2023 05:49:13 +0000 Subject: [PATCH] suppress "Connection closed" message when in quiet mode --- usr.bin/ssh/sftp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 815e000df68..7654fedad7c 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/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 * @@ -254,7 +254,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; } -- 2.20.1