Bug 158410 - [PATCH] www/tomcat55: improve pidfile handling in rc script
Summary: [PATCH] www/tomcat55: improve pidfile handling in rc script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 21:30 UTC by Phil Phillips
Modified: 2011-07-19 23:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.01 KB, patch)
2011-06-28 21:30 UTC, Phil Phillips
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Phillips 2011-06-28 21:30:09 UTC
The current rc script for tomcat55 doesn't seem to stop the java process properly.  The rc script also oddly handles the pidfile.

I reworked the rc script to make sure tomcat stops, and removes the pidfile completely.  Included with this PR is a patch for files/tomcat55.sh.in

Fix: Patch attached with submission follows:
How-To-Repeat: # service tomcat55 stop
--> If tomcat_wait_max_for_pid times out, then the java process is still running
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-28 21:30:19 UTC
Maintainer of www/tomcat55,

Please note that PR ports/158410 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/158410

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-28 21:30:22 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Jason 2011-06-28 22:17:35 UTC
I've tested this patch, and it fixes a long standing issue I've wanted to
fix with the startup/shutdown process for tomcat55.

I approve. This PR can more than likely go with ports/158237

Thanks!
-- 
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2011-06-28 22:41:26 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Olli Hauer freebsd_committer freebsd_triage 2011-07-18 23:25:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ohauer

I'll take it
Comment 6 Olli Hauer freebsd_committer freebsd_triage 2011-07-18 23:26:36 UTC
State Changed
From-To: open->feedback

Hi Phil, Jason, 

whath do you think if we use "! -s" instead "! -e" for the pidfile test? 
This way we can catch files with a zero size before using them later 
with KILL `cat $pidfile`
Comment 7 Phil Phillips 2011-07-19 01:14:03 UTC
That sounds like a good idea to me.

Thanks!
-Phil

On 7/18/2011 3:29 PM, ohauer@FreeBSD.org wrote:
> Synopsis: [PATCH] www/tomcat55: improve pidfile handling in rc script
>
> State-Changed-From-To: open->feedback
> State-Changed-By: ohauer
> State-Changed-When: Mon Jul 18 22:26:36 UTC 2011
> State-Changed-Why:
> Hi Phil, Jason,
>
> whath do you think if we use "! -s" instead "! -e" for the pidfile test?
> This way we can catch files with a zero size before using them later
> with KILL `cat $pidfile`
>
>
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=158410
>
Comment 8 dfilter service freebsd_committer freebsd_triage 2011-07-19 23:45:37 UTC
ohauer      2011-07-19 22:45:27 UTC

  FreeBSD ports repository

  Modified files:
    www/tomcat55         Makefile 
    www/tomcat55/files   tomcat55.sh.in 
  Removed files:
    www/tomcat55/files   logprocessor-cronolog 
  Log:
  - fix cronolog processing option [1]
  - improve pidfile handling in rc script [2]
  
  PR:             ports/158237 [1], ports/158410 [2]
  Submitted by:   Jason Helfman <jhelfman _at_ experts-exchange.com> (maintainer) [1]
                  Phil Phillips <pphillips _at_ experts-exchange.com> [2]
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.59      +7 -15     ports/www/tomcat55/Makefile
  1.2       +0 -74     ports/www/tomcat55/files/logprocessor-cronolog (dead)
  1.11      +8 -19     ports/www/tomcat55/files/tomcat55.sh.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Olli Hauer freebsd_committer freebsd_triage 2011-07-19 23:47:12 UTC
State Changed
From-To: feedback->closed

Committed with minor changes 
Thanks!