From edwin@mavetju.org  Fri Mar 17 11:31:29 2006
Return-Path: <edwin@mavetju.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A8D5716A401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Mar 2006 11:31:29 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from mail2out.barnet.com.au (mail2out.barnet.com.au [202.83.176.14])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2B15043D49
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Mar 2006 11:31:28 +0000 (GMT)
	(envelope-from edwin@mavetju.org)
Received: by mail2out.barnet.com.au (Postfix, from userid 27)
	id 6738F7073FB; Fri, 17 Mar 2006 22:31:26 +1100 (EST)
Received: from mail2-auth.barnet.com.au (mail2.barnet.com.au [202.83.176.13])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "*.barnet.com.au", Issuer "BarNet Root Certificate Authority" (verified OK))
	by mail2.barnet.com.au (Postfix) with ESMTP id 2E4797073D8
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Mar 2006 22:31:26 +1100 (EST)
Received: from k7.mavetju (edwin-3.int.barnet.com.au [10.10.12.2])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mail2-auth.barnet.com.au (Postfix) with ESMTP id AB92F7073D1
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Mar 2006 22:31:25 +1100 (EST)
Received: by k7.mavetju (Postfix, from userid 1001)
	id B579E252; Fri, 17 Mar 2006 22:31:24 +1100 (EST)
Message-Id: <20060317113124.B579E252@k7.mavetju>
Date: Fri, 17 Mar 2006 22:31:24 +1100 (EST)
From: Edwin Groothuis <edwin@mavetju.org>
Reply-To: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: www/tomcat55 - "tomcat55.sh stop" fails
X-Send-Pr-Version: 3.113
X-GNATS-Notify: liukang@cn.freebsd.org

>Number:         94603
>Category:       ports
>Synopsis:       www/tomcat55 - "tomcat55.sh stop" fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lawrance
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 17 11:40:13 GMT 2006
>Closed-Date:    Mon Sep 11 12:54:06 GMT 2006
>Last-Modified:  Mon Sep 11 12:54:06 GMT 2006
>Originator:     Edwin Groothuis
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386

>Description:

[/usr/local/tomcat5.5/webapps/jira2/WEB-INF] root@cleo>/usr/local/etc/rc.d/tomcat55.sh stop
tomcat55 not running? (check /var/run/tomcat55.pid).

[/usr/local/tomcat5.5/webapps/jira2/WEB-INF] root@cleo>cat /var/run/tomcat55.pid 
8331

[/usr/local/tomcat5.5/webapps/jira2/WEB-INF] root@cleo>ps -p 8331
  PID  TT  STAT      TIME COMMAND
 8331  ??  Ss     0:17.76 [java]

Wonder why it fails to determine if it is active or not.

>How-To-Repeat:
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Mar 17 11:44:08 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94603 
Responsible-Changed-From-To: freebsd-ports-bugs->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Fri Mar 17 11:56:03 UTC 2006 
Responsible-Changed-Why:  
Handling it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94603 

From: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
To: bug-followup@FreeBSD.org, edwin@mavetju.org
Cc: lawrance@FreeBSD.org, flz@FreeBSD.org, yar@FreeBSD.org
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Wed, 16 Aug 2006 21:41:00 +0400

 I have same situation.
 
 It's look like problem with _find_processes() function from
 /etc/rc.subr
 
 This function called from tomcat_stop() over check_pidfile().
 
 Problem is -- it's don't work under root, but work under my own user.
 
 small test case:
 ---
 #!/bin/sh
 
 . /etc/rc.subr
 _find_processes 'java' '.' '-p 47050'
 ---
 
 
 where 47050 -- PID of tomcat java process, currently runned on my
 machine.
 
 I run:
 
 $ sh tst.sh 
 47050$
 
 $ sudo sh tst.sh
 
 no data return
 
 WBR
 -- 
 Dmitriy Kirhlarov
 OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
 P:+7 495 105 7247 ext.208 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
 OILspace - The resource enriched - www.oilspace.com

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org, lawrance@FreeBSD.org,
        flz@FreeBSD.org
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Thu, 17 Aug 2006 11:42:16 +0400

 On Wed, Aug 16, 2006 at 09:41:00PM +0400, Dmitriy Kirhlarov wrote:
 > I have same situation.
 > 
 > It's look like problem with _find_processes() function from
 > /etc/rc.subr
 > 
 > This function called from tomcat_stop() over check_pidfile().
 > 
 > Problem is -- it's don't work under root, but work under my own user.
 > 
 > small test case:
 > ---
 > #!/bin/sh
 > 
 > . /etc/rc.subr
 > _find_processes 'java' '.' '-p 47050'
 > ---
 > 
 > 
 > where 47050 -- PID of tomcat java process, currently runned on my
 > machine.
 > 
 > I run:
 > 
 > $ sh tst.sh 
 > 47050$
 > 
 > $ sudo sh tst.sh
 > 
 > no data return
 
 Would you mind running the following command as root and yourself
 and showing its outputs?
 
 	ps -o "pid,jid,command" -p 47050
 
 where 47050 is the tomcat's PID.  That's the way ps would be run by
 _find_processes.
 
 -- 
 Yar

From: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
To: Yar Tikhiy <yar@comp.chem.msu.su>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org,
	lawrance@FreeBSD.org, flz@FreeBSD.org
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Thu, 17 Aug 2006 12:19:02 +0400

 On Thu, Aug 17, 2006 at 11:42:16AM +0400, Yar Tikhiy wrote:
 > On Wed, Aug 16, 2006 at 09:41:00PM +0400, Dmitriy Kirhlarov wrote:
 > > I have same situation.
 > > 
 > > It's look like problem with _find_processes() function from
 > > /etc/rc.subr
 > > 
 > > This function called from tomcat_stop() over check_pidfile().
 > > 
 > > Problem is -- it's don't work under root, but work under my own user.
 > > 
 > > small test case:
 > > ---
 > > #!/bin/sh
 > > 
 > > . /etc/rc.subr
 > > _find_processes 'java' '.' '-p 47050'
 > > ---
 > > 
 > > 
 > > where 47050 -- PID of tomcat java process, currently runned on my
 > > machine.
 > > 
 > > I run:
 > > 
 > > $ sh tst.sh 
 > > 47050$
 > > 
 > > $ sudo sh tst.sh
 > > 
 > > no data return
 > 
 > Would you mind running the following command as root and yourself
 > and showing its outputs?
 > 
 > 	ps -o "pid,jid,command" -p 47050
 > 
 > where 47050 is the tomcat's PID.  That's the way ps would be run by
 > _find_processes.
 
 (12:16:07 <~>)$ cat /var/run/tomcat50.pid 
 47050(12:16:11 <~>)$ sh
 $ ps -o "pid,jid,command" -p 47050
   PID    JID COMMAND
 47050      0 [java]
 $ (12:16:28 <~>)$ su - 
 Password:
 dimma# sh
 # ps -o "pid,jid,command" -p 47050
   PID    JID COMMAND
 47050      0 /usr/local/diablo-jdk1.5.0/bin/java -Djava.endorsed.dirs= -classpa
 #
 
 WBR
 -- 
 Dmitriy Kirhlarov
 OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
 P:+7 495 105 7247 ext.208 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
 OILspace - The resource enriched - www.oilspace.com

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org, lawrance@FreeBSD.org,
        flz@FreeBSD.org
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Fri, 18 Aug 2006 15:21:51 +0400

 On Thu, Aug 17, 2006 at 12:19:02PM +0400, Dmitriy Kirhlarov wrote:
 > On Thu, Aug 17, 2006 at 11:42:16AM +0400, Yar Tikhiy wrote:
 > > On Wed, Aug 16, 2006 at 09:41:00PM +0400, Dmitriy Kirhlarov wrote:
 > > > I have same situation.
 > > > 
 > > > It's look like problem with _find_processes() function from
 > > > /etc/rc.subr
 > > > 
 > > > This function called from tomcat_stop() over check_pidfile().
 > > > 
 > > > Problem is -- it's don't work under root, but work under my own user.
 > > > 
 > > > small test case:
 > > > ---
 > > > #!/bin/sh
 > > > 
 > > > . /etc/rc.subr
 > > > _find_processes 'java' '.' '-p 47050'
 > > > ---
 > > > 
 > > > 
 > > > where 47050 -- PID of tomcat java process, currently runned on my
 > > > machine.
 > > > 
 > > > I run:
 > > > 
 > > > $ sh tst.sh 
 > > > 47050$
 > > > 
 > > > $ sudo sh tst.sh
 > > > 
 > > > no data return
 > > 
 > > Would you mind running the following command as root and yourself
 > > and showing its outputs?
 > > 
 > > 	ps -o "pid,jid,command" -p 47050
 > > 
 > > where 47050 is the tomcat's PID.  That's the way ps would be run by
 > > _find_processes.
 > 
 > (12:16:07 <~>)$ cat /var/run/tomcat50.pid 
 > 47050(12:16:11 <~>)$ sh
 > $ ps -o "pid,jid,command" -p 47050
 >   PID    JID COMMAND
 > 47050      0 [java]
 > $ (12:16:28 <~>)$ su - 
 > Password:
 > dimma# sh
 > # ps -o "pid,jid,command" -p 47050
 >   PID    JID COMMAND
 > 47050      0 /usr/local/diablo-jdk1.5.0/bin/java -Djava.endorsed.dirs= -classpa
 > #
 
 That explains the problem.  As of now, _find_processes() won't strip
 off the directory path from the command name in the output from ps(1).
 Consequently, it should be called as follows to match the output:
 
 _find_processes /usr/local/diablo-jdk1.5.0/bin/java . "-p 47050"
 
 Funnily enough, this way will handle the "[java]" case properly, too,
 because _find_processes() tries to strip off the directory path from
 its first argument.
 
 Can the port's script know the full path to the java binary?  If it can,
 it should pass the full path to _find_processes().
 
 -- 
 Yar

From: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
To: Yar Tikhiy <yar@comp.chem.msu.su>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org,
	lawrance@FreeBSD.org, flz@FreeBSD.org
Subject: [PATCH] Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Mon, 21 Aug 2006 17:05:16 +0400

 On Fri, Aug 18, 2006 at 03:21:51PM +0400, Yar Tikhiy wrote:
 
 > Can the port's script know the full path to the java binary?  If it can,
 > it should pass the full path to _find_processes().
 
 This patch must help:
 
 diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 @@ -109,7 +109,7 @@
  if [ -f $pidfile ]; then
    read rc_pid junk < $pidfile
    if [ ! -z "$rc_pid" ]; then
 -    procname=`ps -o comm= $rc_pid`
 +    procname=`ps -o "command" -p $rc_pid | awk '/java/ {print $1}'`
    fi
  fi
  
 WBR
 -- 
 Dmitriy Kirhlarov
 OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
 P:+7 495 105 7247 ext.208 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
 OILspace - The resource enriched - www.oilspace.com

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org, lawrance@FreeBSD.org,
        flz@FreeBSD.org
Subject: Re: [PATCH] Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Mon, 21 Aug 2006 18:27:33 +0400

 On Mon, Aug 21, 2006 at 05:05:16PM +0400, Dmitriy Kirhlarov wrote:
 > On Fri, Aug 18, 2006 at 03:21:51PM +0400, Yar Tikhiy wrote:
 > 
 > > Can the port's script know the full path to the java binary?  If it can,
 > > it should pass the full path to _find_processes().
 > 
 > This patch must help:
 > 
 > diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 > --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 > +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 > @@ -109,7 +109,7 @@
 >  if [ -f $pidfile ]; then
 >    read rc_pid junk < $pidfile
 >    if [ ! -z "$rc_pid" ]; then
 > -    procname=`ps -o comm= $rc_pid`
 > +    procname=`ps -o "command" -p $rc_pid | awk '/java/ {print $1}'`
 >    fi
 >  fi
 
 Then it can be just
 
 	procname=`ps -ww -o command= -p $rc_pid`
 
 There is no need for awk there.  But the "command" keyword means
 command and its arguments while only the command is needed there.
 Did you consider giving up the hackery with $procname and using
 $command_interpreter?
 
 -- 
 Yar

From: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
To: Yar Tikhiy <yar@comp.chem.msu.su>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org,
	lawrance@FreeBSD.org, flz@FreeBSD.org
Subject: Re: [PATCH] Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Wed, 30 Aug 2006 20:23:50 +0400

 On Mon, Aug 21, 2006 at 06:27:33PM +0400, Yar Tikhiy wrote:
 > On Mon, Aug 21, 2006 at 05:05:16PM +0400, Dmitriy Kirhlarov wrote:
 > > On Fri, Aug 18, 2006 at 03:21:51PM +0400, Yar Tikhiy wrote:
 > > 
 > > > Can the port's script know the full path to the java binary?  If it can,
 > > > it should pass the full path to _find_processes().
 > > 
 > > This patch must help:
 > > 
 > > diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 > > --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 > > +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 > > @@ -109,7 +109,7 @@
 > >  if [ -f $pidfile ]; then
 > >    read rc_pid junk < $pidfile
 > >    if [ ! -z "$rc_pid" ]; then
 > > -    procname=`ps -o comm= $rc_pid`
 > > +    procname=`ps -o "command" -p $rc_pid | awk '/java/ {print $1}'`
 > >    fi
 > >  fi
 > 
 > Then it can be just
 > 
 > 	procname=`ps -ww -o command= -p $rc_pid`
 > 
 > There is no need for awk there.  But the "command" keyword means
 > command and its arguments while only the command is needed there.
 > Did you consider giving up the hackery with $procname and using
 > $command_interpreter?
 
 I investigate it. Look like undesirable -- in start script it must be
 
 /usr/local/bin/java
 
 but for ps it is
 
 /usr/local/diablo-jdk1.5.0/bin/java
 
 and path can be different on different systems with different versions
 of java and jre.
 
 This patch is more fine, for me:
 
 diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 @@ -109,7 +109,7 @@
  if [ -f $pidfile ]; then
    read rc_pid junk < $pidfile
    if [ ! -z "$rc_pid" ]; then
 -    procname=`ps -o comm= $rc_pid`
 +    procname=`ps -o "command" -p $rc_pid | (read a b; echo $a)`
    fi
  fi
 
 
 WBR
 Dmitriy

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org, lawrance@FreeBSD.org,
        flz@FreeBSD.org
Subject: Re: [PATCH] Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Fri, 1 Sep 2006 15:51:20 +0400

 On Wed, Aug 30, 2006 at 08:23:50PM +0400, Dmitriy Kirhlarov wrote:
 > On Mon, Aug 21, 2006 at 06:27:33PM +0400, Yar Tikhiy wrote:
 > > On Mon, Aug 21, 2006 at 05:05:16PM +0400, Dmitriy Kirhlarov wrote:
 > > > On Fri, Aug 18, 2006 at 03:21:51PM +0400, Yar Tikhiy wrote:
 > > > 
 > > > > Can the port's script know the full path to the java binary?  If it can,
 > > > > it should pass the full path to _find_processes().
 > > > 
 > > > This patch must help:
 > > > 
 > > > diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 > > > --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 > > > +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 > > > @@ -109,7 +109,7 @@
 > > >  if [ -f $pidfile ]; then
 > > >    read rc_pid junk < $pidfile
 > > >    if [ ! -z "$rc_pid" ]; then
 > > > -    procname=`ps -o comm= $rc_pid`
 > > > +    procname=`ps -o "command" -p $rc_pid | awk '/java/ {print $1}'`
 > > >    fi
 > > >  fi
 > > 
 > > Then it can be just
 > > 
 > > 	procname=`ps -ww -o command= -p $rc_pid`
 > > 
 > > There is no need for awk there.  But the "command" keyword means
 > > command and its arguments while only the command is needed there.
 > > Did you consider giving up the hackery with $procname and using
 > > $command_interpreter?
 > 
 > I investigate it. Look like undesirable -- in start script it must be
 > 
 > /usr/local/bin/java
 > 
 > but for ps it is
 > 
 > /usr/local/diablo-jdk1.5.0/bin/java
 > 
 > and path can be different on different systems with different versions
 > of java and jre.
 
 I guess that /usr/local/bin/java is a mere wrapper that exec's the
 real java binary.  Right?
 
 > This patch is more fine, for me:
 > 
 > diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 > --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 > +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 > @@ -109,7 +109,7 @@
 >  if [ -f $pidfile ]; then
 >    read rc_pid junk < $pidfile
 >    if [ ! -z "$rc_pid" ]; then
 > -    procname=`ps -o comm= $rc_pid`
 > +    procname=`ps -o "command" -p $rc_pid | (read a b; echo $a)`
 
 What is it for?  If you want to get the name of the process with PID
 equal to $rc_pid, the line should read:
 
 	procname=`ps -o comm= -p $rc_pid`
 
 The original line is just missing the -p for some reason.
 
 By the way, now you can use pgrep(1) in rc scripts if necessary.
 I moved pgrep to /bin in CURRENT, and I'm about to merge that to
 RELENG_6 in a few moments.
 
 >    fi
 >  fi
 > 
 > 
 > WBR
 > Dmitriy
 
 -- 
 Yar

From: Dmitriy Kirhlarov <dkirhlarov@oilspace.com>
To: Yar Tikhiy <yar@comp.chem.msu.su>
Cc: bug-followup@FreeBSD.org, edwin@mavetju.org,
	lawrance@FreeBSD.org, flz@FreeBSD.org
Subject: Re: [PATCH] Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Fri, 1 Sep 2006 16:50:01 +0400

 On Fri, Sep 01, 2006 at 03:51:20PM +0400, Yar Tikhiy wrote:
 
 > > I investigate it. Look like undesirable -- in start script it must be
 > > 
 > > /usr/local/bin/java
 > > 
 > > but for ps it is
 > > 
 > > /usr/local/diablo-jdk1.5.0/bin/java
 > > 
 > > and path can be different on different systems with different versions
 > > of java and jre.
 > 
 > I guess that /usr/local/bin/java is a mere wrapper that exec's the
 > real java binary.  Right?
 
 yes.
 
 > 
 > > This patch is more fine, for me:
 > > 
 > > diff -urNB /usr/ports/www/tomcat55/files/tomcat55.sh.in tomcat55/files/tomcat55.sh.in
 > > --- /usr/ports/www/tomcat55/files/tomcat55.sh.in	Mon Feb 20 23:47:50 2006
 > > +++ tomcat55/files/tomcat55.sh.in	Mon Aug 21 16:32:25 2006
 > > @@ -109,7 +109,7 @@
 > >  if [ -f $pidfile ]; then
 > >    read rc_pid junk < $pidfile
 > >    if [ ! -z "$rc_pid" ]; then
 > > -    procname=`ps -o comm= $rc_pid`
 > > +    procname=`ps -o "command" -p $rc_pid | (read a b; echo $a)`
 > 
 > What is it for?  If you want to get the name of the process with PID
 > equal to $rc_pid, the line should read:
 > 
 > 	procname=`ps -o comm= -p $rc_pid`
 > 
 > The original line is just missing the -p for some reason.
 
 It not work.
 Yar, sorry, but now I look some miscommunication and want to remind
 begin of problem.
 rc.d/tomcat55 script don't stop a daemon, because don't get return
 in string:
 rc_pid=$(check_pidfile $pidfile $procname)
 I get this situation and find opened PR ports/94603 (see subject :)
 
 I'm discover, what _find_processes function from rc.subr in our case,
 work fine only with unprivileged user, but not under root. I suspected
 problem in this function and send copy of followup to you, after
 looking list of last commits to rc.subr.
 
 With your help, I find way to patch tomcat55 start-stop script,
 for correct work, without using awk (see my previous letter) and now
 don't have any complains to rc.subr. :)
 Thank you for help.
 
 I'm hope, what maintainer find time and will fix this problem.
 
 WBR
 -- 
 Dmitriy Kirhlarov
 OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
 P:+7 495 105 7247 ext.208 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
 OILspace - The resource enriched - www.oilspace.com
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Wed Sep 6 23:14:49 UTC 2006 
State-Changed-Why:  
Maintainer was reset. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94603 

From: Pav Lucistnik <pav@FreeBSD.org>
To: bug-followup@FreeBSD.org, edwin@mavetju.org, dkirhlarov@oilspace.com
Cc:  
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Fri, 08 Sep 2006 11:33:29 +0200

 Folks, can you update the port to 5.5.17_1 and tell me, if the problem
 persists at your place?
 
 -- 
 Pav Lucistnik <pav@oook.cz>
               <pav@FreeBSD.org>
 
 Squish. Larger than the normal icky things, and twice as icky.

From: Sam Lawrance <boris@brooknet.com.au>
To: Pav Lucistnik <pav@FreeBSD.org>,  bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
Date: Mon, 11 Sep 2006 22:32:11 +1000

 Pav Lucistnik wrote:
 > The following reply was made to PR ports/94603; it has been noted by GNATS.
 >
 > From: Pav Lucistnik <pav@FreeBSD.org>
 > To: bug-followup@FreeBSD.org, edwin@mavetju.org, dkirhlarov@oilspace.com
 > Cc:  
 > Subject: Re: ports/94603: www/tomcat55 - "tomcat55.sh stop" fails
 > Date: Fri, 08 Sep 2006 11:33:29 +0200
 >
 >  Folks, can you update the port to 5.5.17_1 and tell me, if the problem
 >  persists at your place?
 That fix works fine here, please close it if you like.
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Mon Sep 11 12:53:56 UTC 2006 
State-Changed-Why:  
Fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94603 
>Unformatted:
