r23559 - in /trunk/libproc-processtable-perl: Changes META.yml ProcessTable.pm README debian/changelog os/darwin.c os/darwin.h

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jul 26 11:48:51 UTC 2008


Author: gregoa
Date: Sat Jul 26 11:48:49 2008
New Revision: 23559

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23559
Log:
New upstream release.

Modified:
    trunk/libproc-processtable-perl/Changes
    trunk/libproc-processtable-perl/META.yml
    trunk/libproc-processtable-perl/ProcessTable.pm
    trunk/libproc-processtable-perl/README
    trunk/libproc-processtable-perl/debian/changelog
    trunk/libproc-processtable-perl/os/darwin.c
    trunk/libproc-processtable-perl/os/darwin.h

Modified: trunk/libproc-processtable-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/Changes?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/Changes (original)
+++ trunk/libproc-processtable-perl/Changes Sat Jul 26 11:48:49 2008
@@ -278,3 +278,7 @@
 	problems on darwin from  Tom Wyant <twyant3 at comcast.net>
 	(rt.cpan.org bug IDs 24331, 32761, and 33698); fix for ARG_MAX
 	dynamic configuration in os/Linux.h (rt.cpan.org bug ID 36283).
+
+0.44	Fri Jul 25 08:25:52 MDT 2008
+	-Patch from Tom Wyant <twyant3 at comcast.net> for darwin issues
+	that didn't make it into 0.43.

Modified: trunk/libproc-processtable-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/META.yml?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/META.yml (original)
+++ trunk/libproc-processtable-perl/META.yml Sat Jul 26 11:48:49 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Proc-ProcessTable
-version:      0.43
+version:      0.44
 version_from: ProcessTable.pm
 installdirs:  site
 requires:

Modified: trunk/libproc-processtable-perl/ProcessTable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/ProcessTable.pm?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/ProcessTable.pm (original)
+++ trunk/libproc-processtable-perl/ProcessTable.pm Sat Jul 26 11:48:49 2008
@@ -16,7 +16,7 @@
 @EXPORT = qw(
 	
 );
-$VERSION = '0.43';
+$VERSION = '0.44';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()

Modified: trunk/libproc-processtable-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/README?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/README (original)
+++ trunk/libproc-processtable-perl/README Sat Jul 26 11:48:49 2008
@@ -1,4 +1,4 @@
-Proc::ProcessTable, version 0.43
+Proc::ProcessTable, version 0.44
 
 Please use rt.cpan.org to submit bugs and patches.
 

Modified: trunk/libproc-processtable-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/debian/changelog?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/debian/changelog (original)
+++ trunk/libproc-processtable-perl/debian/changelog Sat Jul 26 11:48:49 2008
@@ -1,3 +1,9 @@
+libproc-processtable-perl (0.44-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 26 Jul 2008 13:47:42 +0200
+
 libproc-processtable-perl (0.43-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libproc-processtable-perl/os/darwin.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/os/darwin.c?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/os/darwin.c (original)
+++ trunk/libproc-processtable-perl/os/darwin.c Sat Jul 26 11:48:49 2008
@@ -37,7 +37,7 @@
  * The portions of this code which were necessary to tie into the Perl
  * Proc::ProcessTable module are:
  *
- * Copyright (c) 2003, 2004 by Thomas R. Wyant, III
+ * Copyright (c) 2003, 2004, 2008 by Thomas R. Wyant, III
  *
  * and may be reused under the same terms as Perl itself.
  */
@@ -141,15 +141,27 @@
 
 #if 1
 	kp += nentries - 1;
-	for (i = 1; i <= nentries; i++, --kp) {
+/*	The following turns out to be an off-by-one error, found by
+ *	Jan Ruzucka. I suspect I was confused by the original code's
+ *	predecrementing i in the test portion of the for(), not the
+ *	more usual increment portion.
+ *	for (i = 1; i <= nentries; i++, --kp) {	*/
+	for (i = 0; i < nentries; i++, --kp) {
 #else
 	for (i = nentries; --i >= 0; ++kp) {
 #endif
 		struct extern_proc *p;
 		struct eproc *e;
+		/* Also, jlv pointed out that the original kinfo,
+		 * allocated to hold all process entries, was not
+		 * needed or efficiently used, and an automatic
+		 * kinfo big enough to hold a single process entry,
+		 * was all that was needed. His rt.cpan.org ticket
+		 * (24331) also reports the same off-by-one error
+		 * previously reported by Jan Ruzucka */
 		KINFO kinfo;
+		memset(&kinfo, 0, sizeof(kinfo));
 		KINFO *ki = &kinfo;
-		memset(ki, 0, sizeof(*ki));
 #ifdef TESTING
 		char *ttname = NULL;
 #endif /* def TESTING */

Modified: trunk/libproc-processtable-perl/os/darwin.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-processtable-perl/os/darwin.h?rev=23559&op=diff
==============================================================================
--- trunk/libproc-processtable-perl/os/darwin.h (original)
+++ trunk/libproc-processtable-perl/os/darwin.h Sat Jul 26 11:48:49 2008
@@ -37,7 +37,7 @@
  * The portions of this code which were necessary to tie into the Perl
  * Proc::ProcessTable module are:
  *
- * Copyright (c) 2003, Thomas R. Wyant, III
+ * Copyright (c) 2003 and 2008, Thomas R. Wyant, III
  *
  * and may be reused under the same terms as Perl itself.
  */
@@ -60,7 +60,11 @@
 #include <sys/resource.h>
 #include <sys/stat.h>
 #include <sys/sysctl.h>
+#ifndef KERN_PROCARGS2	/* Not defined in Jaguar (10.2);
+			   Defined in Panther (10.3) at least
+			   through Leopard (10.5). */
 #include <kvm.h>
+#endif
 #include <unistd.h>
 
 
@@ -108,7 +112,11 @@
 		struct policy_fifo_info fifo;
 	} schedinfo;
 	int	invalid_tinfo;
+#ifdef KERN_PROCARGS2	/* Defined in Panther (10.3) and up */
+	mach_msg_type_number_t	thread_count;
+#else
 	int	thread_count;
+#endif
 	thread_port_array_t thread_list;
 	thread_values_t *thval;
 	int	invalid_thinfo;




More information about the Pkg-perl-cvs-commits mailing list