ports/130647: devel/p5-File-Pid: uninitialized value warning if you call running without an existing pid file

Alexander Kriventsov akriventsov at masterhost.ru
Mon Jan 19 13:40:07 UTC 2009


The following reply was made to PR ports/130647; it has been noted by GNATS.

From: Alexander Kriventsov <akriventsov at masterhost.ru>
To: bug-followup at FreeBSD.org, akriventsov at masterhost.ru
Cc:  
Subject: Re: ports/130647: devel/p5-File-Pid: uninitialized value warning
 if you call running without an existing pid file
Date: Mon, 19 Jan 2009 16:08:58 +0300

 Sorry, correct patch is
 
 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 10:48:03.613381790 +0000
 @@ -7,6 +7,7 @@
 
   PORTNAME=      File-Pid
   PORTVERSION=   1.01
 +PORTREVISION=  1
   CATEGORIES=    devel perl5
   MASTER_SITES=  CPAN
   PKGNAMEPREFIX= p5-
 @@ -21,4 +22,7 @@
 
   MAN3=          File::Pid.3
 
 +post-patch:
 +       ${RM} ${WRKSRC}/lib/File/Pid.pm.orig
 +
   .include <bsd.port.mk>
 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 
 10:11:50.058553176 +0000
 @@ -0,0 +1,11 @@
 +--- lib/File/Pid.pm    2009-01-17 09:44:31.653906918 +0000
 ++++ 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
 
 -- 
 Best Regards,
 Alexander Kriventsov
 .masterhost



More information about the freebsd-ports-bugs mailing list