Bug 209454 - www/tomcat6: rc-script status/stop fail if pid has less than 5 digits
Summary: www/tomcat6: rc-script status/stop fail if pid has less than 5 digits
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-11 13:42 UTC by wolfgang
Modified: 2017-05-06 16:39 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ale)


Attachments
patch the rc-script template to ignore whitespace in front of pid output (476 bytes, patch)
2016-05-11 13:42 UTC, wolfgang
no flags Details | Diff
fixed version of patch (476 bytes, patch)
2016-05-11 13:47 UTC, wolfgang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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