This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 988d7cc  Switch the check for terminal availability to test for stdin
988d7cc is described below

commit 988d7cc66ac91694dc3f804379e5537b254c3ac9
Author: Mark Thomas <ma...@apache.org>
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 | 9 +++++++++
 2 files changed, 10 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 d1d9477..67799fb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -79,6 +79,15 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection>
+    <changelog>
+      <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>
 <section name="Tomcat 9.0.21 (markt)" rtext="2019-06-07">
   <subsection name="Catalina">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to