[openssh-commits] [openssh] 01/05: upstream: silence "mm_log_handler: write: Broken pipe" logspam

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 10 13:35:31 AEDT 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 649c9994e7d1995a03d8621f1412cfee90a430af
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Oct 9 03:23:33 2025 +0000

    upstream: silence "mm_log_handler: write: Broken pipe" logspam
    
    OpenBSD-Commit-ID: bcf7c6ea509e755bd5a7cd567ff7cad725111a14
---
 monitor_wrap.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/monitor_wrap.c b/monitor_wrap.c
index 33494b73f..e5b620d9c 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.142 2025/09/25 06:31:42 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.143 2025/10/09 03:23:33 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos at citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus at openbsd.org>
@@ -106,8 +106,13 @@ mm_log_handler(LogLevel level, int forced, const char *msg, void *ctx)
 		fatal_f("bad length %zu", len);
 	POKE_U32(sshbuf_mutable_ptr(log_msg), len - 4);
 	if (atomicio(vwrite, mon->m_log_sendfd,
-	    sshbuf_mutable_ptr(log_msg), len) != len)
+	    sshbuf_mutable_ptr(log_msg), len) != len) {
+		if (errno == EPIPE) {
+			debug_f("write: %s", strerror(errno));
+			cleanup_exit(255);
+		}
 		fatal_f("write: %s", strerror(errno));
+	}
 	sshbuf_free(log_msg);
 }
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list