This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 04bfd19 Switch the check for terminal availability to test for stdin
04bfd19 is described below
commit 04bfd191d54e28199b43444867778de4348a73de
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jun 24 22:17:36 2019 +0100
Switch the check for terminal availability to test for stdin
Using stdout does not work when output is piped to another process.
Patch provided by Radosław Józwik.
---
bin/catalina.sh | 2 +-
webapps/docs/changelog.xml | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/bin/catalina.sh b/bin/catalina.sh
index 55fd90b..4f84d57 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -228,7 +228,7 @@ fi
# Bugzilla 37848: When no TTY is available, don't output to console
have_tty=0
-if [ -t 1 ]; then
+if [ -t 0 ]; then
have_tty=1
fi
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2385a68..6266e79 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -110,6 +110,11 @@
<bug>63523</bug>: Restore SSLUtilBase methods as protected to preserve
compatibility. (remm)
</fix>
+ <fix>
+ Switch the check for terminal availability to test for stdin as using
+ stdout does not work when output is piped to another process. Patch
+ provided by Radosław Józwik. (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]