Bug 130647 - devel/p5-File-Pid: uninitialized value warning if you call running without an existing pid file
Summary: devel/p5-File-Pid: uninitialized value warning if you call running without an...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-17 10:00 UTC by Alexander Kriventsov
Modified: 2009-03-13 13:20 UTC (History)
0 users

See Also:


Attachments
file.diff (215 bytes, patch)
2009-01-17 10:00 UTC, Alexander Kriventsov
no flags Details | Diff
file.diff (664 bytes, patch)
2009-01-17 10:00 UTC, Alexander Kriventsov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kriventsov 2009-01-17 10:00:05 UTC
uninitialized value warning if you call running without an existing pid file (ie run the first time)

Fix: PORTNAME=      File-Pid
 PORTVERSION=   1.01
+PORTREVISION=  1
 CATEGORIES=    devel perl5
 MASTER_SITES=  CPAN
 PKGNAMEPREFIX= p5-
Comment 1 Alexander Kriventsov 2009-01-19 13:08:58 UTC
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
Comment 2 Stefan Walter freebsd_committer freebsd_triage 2009-02-05 10:34:52 UTC
Dear maintainer of devel/p5-File-Pid,

a problem report has been submitted for your port for which your 
feedback might be required; its contents can be found at [1]. If it 
contains a patch or suggestions for a change, please send a followup to 
the PR explaining whether or not you approve it and want it to be 
committed.

Regards,
Stefan

[1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/130647
Comment 3 gslin 2009-03-10 04:26:32 UTC
Hello,

Please commit this, thanks.

On Thu, Feb 05, 2009 at 11:34:52AM +0100, Stefan Walter wrote:
> Dear maintainer of devel/p5-File-Pid,
> 
> a problem report has been submitted for your port for which your 
> feedback might be required; its contents can be found at [1]. If it 
> contains a patch or suggestions for a change, please send a followup to 
> the PR explaining whether or not you approve it and want it to be 
> committed.
> 
> Regards,
> Stefan
> 
> [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/130647

-- 
* Gea-Suan Lin  (public key: Using https://keyserver.pgp.com/ to search)
* If you cannot convince them, confuse them.           -- Harry S Truman
Comment 4 dfilter service freebsd_committer freebsd_triage 2009-03-13 13:11:38 UTC
arved       2009-03-13 13:11:27 UTC

  FreeBSD ports repository

  Modified files:
    devel/p5-File-Pid    Makefile 
  Added files:
    devel/p5-File-Pid/files patch-lib-File-Pid.pm 
  Log:
  Fix unitialized value warning if program is called without an existing pid
  
  PR:             130647
  Submitted by:   Alexander Kriventsov
  Approved by:    Gea-Suan Lin <gslin@gslin.org> (maintainer)
  
  Revision  Changes    Path
  1.3       +4 -0      ports/devel/p5-File-Pid/Makefile
  1.1       +11 -0     ports/devel/p5-File-Pid/files/patch-lib-File-Pid.pm (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Tilman Keskinoz freebsd_committer freebsd_triage 2009-03-13 13:12:09 UTC
State Changed
From-To: open->closed

Committed, thanks