On Wed, Apr 22, 2020 at 11:34 AM Rafael Oliveira <r.rolivei...@gmail.com> wrote:
> Hello everyone during some tests where I ran in my local environment I came
> across an odd behavior on tomcat start
>
> During the start process catalina.sh script create a new PID file using the
> following statement
> *echo $! > "CATALINA_PID"*
>
> $! *Expands to the process **ID** of the job most recently placed into the
> background,* whether executed as an asynchronous command or using the bg
>  builtin

Correct.

> The PID number inside the PID file is different of the tomcat process

Not on my installations - using "./catalina.sh start  > startup.txt 2>&1"

user@stimpy:~/bin/apache-tomcat-9.0.26/bin> cat cat-pid
8732
user@stimpy:~/bin/apache-tomcat-9.0.26/bin> ps -aux | grep tomcat
user    8732  1.3  0.2 23279772 161408 pts/1 Sl   00:28   0:05
/usr/lib64/jvm/java/bin/java
-Djava.util.logging.config.file=/home/user/bin/apache-tomcat-9.0.26/

... and using "startup.sh"

user@stimpy:~/bin/apache-tomcat-9.0.26/bin> cat cat-pid
9861
user@stimpy:~/bin/apache-tomcat-9.0.26/bin> ps -aux | grep tomcat
user   9861 18.4  0.2 23277724 148168 pts/1 Sl   00:37   0:04
/usr/lib64/jvm/java/bin/java
-Djava.util.logging.config.file=/home/user/bin/apache-tomcat-9.0.26/

> started which I could verify with:
> ps -ef  | grep 'catalina.base=$CATALINA_HOME'

??

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

Reply via email to