diff mbox series

[pseudo,10/34] Replace #if 0 strerror() debug messages with a comment

Message ID 1794370862-30908-11-git-send-email-mark.hatle@kernel.crashing.org
State New
Headers show
Series Various fixes | expand

Commit Message

Mark Hatle Nov. 11, 2026, 4:20 a.m. UTC
From: Mark Hatle <mark.hatle@amd.com>

The wrapper template and popen() kept a disabled debug message using
strerror(), with a comment that strerror() can hang on systems using
locale data for it.  Keep the explanation, as a comment by the message
that prints errno as a number, and drop the disabled code.

AI-Generated: Uses GitHub Copilot
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
---
 ports/unix/pseudo_wrappers.c | 7 +------
 templates/wrapfuncs.c        | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/ports/unix/pseudo_wrappers.c b/ports/unix/pseudo_wrappers.c
index 41398e4..b0faca8 100644
--- a/ports/unix/pseudo_wrappers.c
+++ b/ports/unix/pseudo_wrappers.c
@@ -30,12 +30,7 @@  popen(const char *command, const char *mode) {
 	save_errno = errno;
 	pseudo_droplock();
 	sigprocmask(SIG_SETMASK, &saved, NULL);
-#if 0
-/* This can cause hangs on some recentish systems which use locale
- * stuff for strerror...
- */
-	pseudo_debug(PDBGF_WRAPPER, "completed: popen (maybe: %s)\n", strerror(save_errno));
-#endif
+	/* not strerror(), which can hang on systems using locale data for it */
 	pseudo_debug(PDBGF_WRAPPER, "completed: popen (errno: %d)\n", save_errno);
 	errno = save_errno;
 	return rc;
diff --git a/templates/wrapfuncs.c b/templates/wrapfuncs.c
index a57c997..d7fb548 100644
--- a/templates/wrapfuncs.c
+++ b/templates/wrapfuncs.c
@@ -78,12 +78,7 @@  quick_exit:
 	pseudo_droplock();
 	sigprocmask(SIG_SETMASK, &saved, NULL);
 	pseudo_debug(PDBGF_WRAPPER | PDBGF_VERBOSE, "${name} - yielded lock, restored signals\n");
-#if 0
-/* This can cause hangs on some recentish systems which use locale
- * stuff for strerror...
- */
-	pseudo_debug(PDBGF_WRAPPER, "wrapper completed: ${name} returns ${rc_format} (errno: %s)\n", ${rc_value}, strerror(save_errno));
-#endif
+	/* not strerror(), which can hang on systems using locale data for it */
 	pseudo_debug(PDBGF_WRAPPER, "wrapper completed: ${name} returns ${rc_format} (errno: %d)\n", ${rc_value}, save_errno);
 	errno = save_errno;
 	PROFILE_DONE;