Bug 63244

Summary: CATALINA_PID never get written
Product: Tomcat 9 Reporter: Yiftach <yiftach>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 9.0.16   
Target Milestone: -----   
Hardware: PC   
OS: Linux   

Description Yiftach 2019-03-08 11:38:01 UTC
Since the fix of 53930 when running catalina.sh the catalina_pid_file (and hence the CATALINA_PID) is written only after the _RUNJAVA command ends successfully, but since the _RUNJAVA command is the actual server, it should not complete, so the PID file is not written (and tomcat cannot be run as a service script). 

I think that replacing the double ampersand with a single ampersand would solve the problem.
Comment 1 Mark Thomas 2019-03-08 11:54:54 UTC

*** This bug has been marked as a duplicate of bug 63041 ***
Comment 2 Yiftach 2019-03-08 12:06:09 UTC
Was it resolved by bug 63041? AFAIK bug 63041 was released in 9.0.16 but I can still see the issue.
Comment 3 Thomas Opfer 2019-03-08 13:05:19 UTC
(In reply to Yiftach from comment #2)
> Was it resolved by bug 63041? AFAIK bug 63041 was released in 9.0.16 but I
> can still see the issue.

It will be fixed correctly in the next release, see here: https://ci.apache.org/projects/tomcat/tomcat9/docs/changelog.html

Unfortunately, the bug was fixed incorrectly in the past.
Comment 4 Ruslan Sibgatullin 2021-06-17 13:40:01 UTC
Hey, we are on version 9.0.46 but the problem is still there.
is there any workaround apart from patching catalina.sh file?
Comment 5 Ruslan Sibgatullin 2021-06-17 13:47:33 UTC
(In reply to Ruslan Sibgatullin from comment #4)
> Hey, we are on version 9.0.46 but the problem is still there.
> is there any workaround apart from patching catalina.sh file?

forget it...
it turned out we are on version 9.0.16