Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2005 19:42:54 GMT
From:      Xanthor <xanthor@middleearthnet.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/76370: Mailgraph.sh: Error on status/stop; can't find pid 
Message-ID:  <200501171942.j0HJgsJk078300@www.freebsd.org>
Resent-Message-ID: <200501171950.j0HJoQdu041066@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         76370
>Category:       ports
>Synopsis:       Mailgraph.sh: Error on status/stop; can't find pid
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 19:50:26 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Xanthor
>Release:        FreeBSD 5.3-STABLE
>Organization:
MiddleEarthnet
>Environment:
FreeBSD isengard.middleearthnet.com 5.3-STABLE FreeBSD 5.3-STABLE #0: Fri Dec 31 11:21:23 CET 2004     root@isengard.middleearthnet.com:/usr/obj/usr/src/sys/ISENGARD  i386
>Description:
After mailgraph has been started through the command /usr/local/etc/rc.d/mailgraph.sh start, issuing the command /usr/local/etc/rc.d/mailgraph.sh status it returns: "mailgraph is not running."; while using the stop parameter, it returns; "mailgraph not running? (check /var/db/mailgraph/mailgraph.pid)".
This is due to the fact the saved pid, resolves to "[perl]" instead of the program name.
 
>How-To-Repeat:
Just run the start/status/stop script.
>Fix:
Edit /usr/local/sbin/mailgraph.pl and add the following line:
$0="mailgraph.pl". 
Infact "perldoc perlvar" states:
"On some (read: not all) operating systems assigning to $0 modifies the argument area that the "ps" program sees.  On some platforms you may have to use special "ps" options or a different "ps" to see the changes.  Modifying the $0 is more useful as a way of indicating the current program state than it is for hiding the program you're running."
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501171942.j0HJgsJk078300>