On 29/03/2010, [email protected] <[email protected]> wrote:
> Author: markt
>  Date: Mon Mar 29 11:51:46 2010
>  New Revision: 928732
>
>  URL: http://svn.apache.org/viewvc?rev=928732&view=rev
>  Log:
>  Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48840
>  If CDPATH is set, cd may result in output to stdout.
>  Swallow the output. This is safe since the script outputs the value used of 
> CATALINA_HOME so any issues will be visible then.
>
>  Modified:
>     tomcat/trunk/bin/catalina.sh
>
>  Modified: tomcat/trunk/bin/catalina.sh
>  URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=928732&r1=928731&r2=928732&view=diff
>  
> ==============================================================================
>  --- tomcat/trunk/bin/catalina.sh (original)
>  +++ tomcat/trunk/bin/catalina.sh Mon Mar 29 11:51:46 2010
>  @@ -105,7 +105,7 @@ done
>   PRGDIR=`dirname "$PRG"`
>
>   # Only set CATALINA_HOME if not already set
>  -[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
>  +[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null 2>&1 ; 
> pwd`
>

The following is perhaps simpler, and does not lose stderr:

CATALINA_HOME=`CDPATH= cd "$PRGDIR/.."; pwd`


>   # Ensure that any user defined CLASSPATH variables are not used on startup,
>   # but allow them to be specified in setenv.sh, in rare case when it is 
> needed.
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected]
>  For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to