Bug 209454

Summary: www/tomcat6: rc-script status/stop fail if pid has less than 5 digits
Product: Ports & Packages Reporter: wolfgang
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Some People CC: ler, vvd
Priority: --- Flags: bugzilla: maintainer-feedback? (ale)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch the rc-script template to ignore whitespace in front of pid output
none
fixed version of patch none

Description wolfgang 2016-05-11 13:42:16 UTC
Created attachment 170212 [details]
patch the rc-script template to ignore whitespace in front of pid output

The tomcat_check_pidfile subroutine in /usr/local/etc/rc.d/tomcat6 fails to find a running tomcat process if the procstat output begins with whitespace in front of the pid, resulting in "status" not seeing the process and "stop" failing to stop it.
The attached patch fixes the problem for me.
Comment 1 wolfgang 2016-05-11 13:47:57 UTC
Created attachment 170213 [details]
fixed version of patch

sorry, typo in first attached patch file, this one is now correct
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2017-04-08 14:30:45 UTC
Same for me (confirmed) - just tested.
Comment 3 Larry Rosenman freebsd_committer freebsd_triage 2017-05-06 16:38:58 UTC
Committed thanks
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-05-06 16:39:35 UTC
A commit references this bug:

Author: ler
Date: Sat May  6 16:38:37 UTC 2017
New revision: 440281
URL: https://svnweb.freebsd.org/changeset/ports/440281

Log:
  www/tomcat6: rc-script status/stop fail if pid has less than 5 digit

  PR:		209454
  Submitted by:	wolfgang@lyxys.ka.sub.org
  Approved by:	adamw (mentor, implicit)

Changes:
  head/www/tomcat6/files/tomcat6.in