Date: Sat, 17 Jan 2009 13:53:36 +0300 From: Alexander Kriventsov <akriventsov@masterhost.ru> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/130647: uninitialized value warning if you call running without an existing pid file Message-ID: <4971B8B0.2020102@masterhost.ru> In-Reply-To: <200901171000.n0HA05Q1088116@freefall.freebsd.org> References: <200901171000.n0HA05Q1088116@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4971B8B0.2020102>