From 3d171a79f16eda95b9fa6e4f42cd762d3faa687a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 3 Nov 2026 06:40:36 +0100 Subject: [PATCH] Squashed 'cgilite/' changes from ca8a3d61..2390146d 2390146d automatically discard stderr when running via inetd git-subtree-dir: cgilite git-subtree-split: 2390146d94760232970fc8609ede4e398be50a92 --- cgilite.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cgilite.sh b/cgilite.sh index f261f9c..0d12260 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -3,7 +3,7 @@ # This is CGIlite. # A collection of posix shell functions for writing CGI scripts. -# Copyright 2017 - 2023, 2025 Paul Hänsch +# Copyright 2017 - 2023, 2025 - 2026 Paul Hänsch # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -52,6 +52,11 @@ _DATA="${_DATA:-${PWD:-.}}" _EXEC="${_EXEC%/}" _DATA="${_DATA%/}" _BASE="${_BASE%/}" # Do not set DEBUG here, because it will increase log level +# discard stderr when running via inetd (relies on undocumented env var?) +if [ -z "$DEBUG" -a -n "$inetd_dummy" ]; then + exec 2>/dev/null +fi + export _EXEC _DATA _BASE # Carriage Return and Line Break characters for convenience -- 2.47.3