Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2009 09:56:19 GMT
From:      Alexander Kriventsov <akriventsov@masterhost.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/130647: uninitialized value warning if you call running without an existing pid file
Message-ID:  <200901170956.n0H9uJNW086184@www.freebsd.org>
Resent-Message-ID: <200901171000.n0HA05Ft088122@freefall.freebsd.org>

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

>Number:         130647
>Category:       ports
>Synopsis:       uninitialized value warning if you call running without an existing pid file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 10:00:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Kriventsov
>Release:        7.0-amd64-20080807-RELENG_7_0
>Organization:
.masterhost
>Environment:
FreeBSD perl.akriventsov.int.test.masterhost.ru 7.0-amd64-20080807-RELENG_7_0 FreeBSD 7.0-amd64-20080807-RELENG_7_0 #0: Thu Aug  7 17:52:24 UTC 2008     root@svc9.int.masterhost.ru:/usr/obj/usr/src/sys/GENERICDEBUG  amd64

>Description:
uninitialized value warning if you call running without an existing pid file (ie run the first time)
>How-To-Repeat:

>Fix:
diff -r -u -B -N p5-File-Pid.orig/Makefile p5-File-Pid/Makefile
--- p5-File-Pid.orig/Makefile   2008-04-17 14:25:25.000000000 +0000
+++ p5-File-Pid/Makefile        2009-01-17 09:53:01.483102337 +0000
@@ -7,6 +7,7 @@

 PORTNAME=      File-Pid
 PORTVERSION=   1.01
+PORTREVISION=  1
 CATEGORIES=    devel perl5
 MASTER_SITES=  CPAN
 PKGNAMEPREFIX= p5-
diff -r -u -B -N p5-File-Pid.orig/files/patch-lib-File-Pid.pm p5-File-Pid/files/patch-lib-File-Pid.pm
--- p5-File-Pid.orig/files/patch-lib-File-Pid.pm        1970-01-01 00:00:00.000000000 +0000
+++ p5-File-Pid/files/patch-lib-File-Pid.pm     2009-01-17 09:47:41.267318225 +0000
@@ -0,0 +1,11 @@
+--- File-Pid-1.01/lib/File/Pid.pm.orig 2009-01-17 09:44:31.653906918 +0000
++++ File-Pid-1.01/lib/File/Pid.pm      2009-01-17 09:44:01.397399415 +0000
+@@ -119,7 +119,7 @@
+
+ sub running {
+     my $self = shift;
+-    my $pid  = $self->_get_pid_from_file;
++    my $pid  = $self->_get_pid_from_file or return undef;
+
+     return   kill(0, $pid)
+            ? $pid


>Release-Note:
>Audit-Trail:
>Unformatted:



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