2010/11/18 André Warnier <a...@ice-sa.com>:
> I prefer Konstantin's first suggestion.
> Now the question is : if Tomcat writes it's PID to that file, where does
> Tomcat get it from ?
>

Look into catalina.sh

echo $! > "$CATALINA_PID"

(after spawning java as a background process)


BTW, from all methods listed in the comments on

[2] http://blog.igorminar.com/2007/03/how-java-application-can-discover-its.html

I like the following:
  int pid = Integer.parseInt( ( new
File("/proc/self")).getCanonicalFile().getName() );

There are others as well.

Best regards,
Konstantin Kolinko

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

Reply via email to