If CATALINA_PID is defined and start is called twice in succession CATALINA_PID will be over-written by second start (that will fail as the ports are in use). This will leave the PID file referencing the wrong PID. This could be fixed be preventing a start if the PID file already exists. This requires adding code to remove the PID file on successful stop. Since the stop command returns before the process exits, some form of timeout is necessary. Patch to follow shortly.
This has been fixed in trunk and proposed for 6.0.x
Created attachment 24202 [details] Combined patch The attach patch combines the 3 trunk patches into a single patch.
This has been fixed in 6.0.x and will be included in 6.0.21 onwards.