This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 5456eab Switch the check for terminal availability to test for stdin
5456eab is described below
commit 5456eab8ef2f998b86a7062a6627fadf4b2d2952
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 | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/catalina.sh b/bin/catalina.sh
index d479c8e..2ff3f28 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -212,7 +212,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 b7723c1..64db49f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -194,7 +194,8 @@
<fix>
Use the <code>test</code> command to check for terminal availability
rather than the <code>tty</code> command since the <code>tty</code>
- based test fails on non-English locales. (markt)
+ based test fails on non-English locales. Patch provided by Radosław
+ Józwik. (markt)
</fix>
</changelog>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]