r23557 - in /branches/upstream/libproc-processtable-perl/current: Changes META.yml ProcessTable.pm README os/darwin.c os/darwin.h

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jul 26 11:47:25 UTC 2008


Author: gregoa
Date: Sat Jul 26 11:47:22 2008
New Revision: 23557

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23557
Log:
[svn-upgrade] Integrating new upstream version, libproc-processtable-perl (0.44)

Modified:
    branches/upstream/libproc-processtable-perl/current/Changes
    branches/upstream/libproc-processtable-perl/current/META.yml
    branches/upstream/libproc-processtable-perl/current/ProcessTable.pm
    branches/upstream/libproc-processtable-perl/current/README
    branches/upstream/libproc-processtable-perl/current/os/darwin.c
    branches/upstream/libproc-processtable-perl/current/os/darwin.h

Modified: branches/upstream/libproc-processtable-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/Changes?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/Changes (original)
+++ branches/upstream/libproc-processtable-perl/current/Changes Sat Jul 26 11:47:22 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: branches/upstream/libproc-processtable-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/META.yml?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/META.yml (original)
+++ branches/upstream/libproc-processtable-perl/current/META.yml Sat Jul 26 11:47:22 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: branches/upstream/libproc-processtable-perl/current/ProcessTable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/ProcessTable.pm?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/ProcessTable.pm (original)
+++ branches/upstream/libproc-processtable-perl/current/ProcessTable.pm Sat Jul 26 11:47:22 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: branches/upstream/libproc-processtable-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/README?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/README (original)
+++ branches/upstream/libproc-processtable-perl/current/README Sat Jul 26 11:47:22 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: branches/upstream/libproc-processtable-perl/current/os/darwin.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/os/darwin.c?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/os/darwin.c (original)
+++ branches/upstream/libproc-processtable-perl/current/os/darwin.c Sat Jul 26 11:47:22 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: branches/upstream/libproc-processtable-perl/current/os/darwin.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libproc-processtable-perl/current/os/darwin.h?rev=23557&op=diff
==============================================================================
--- branches/upstream/libproc-processtable-perl/current/os/darwin.h (original)
+++ branches/upstream/libproc-processtable-perl/current/os/darwin.h Sat Jul 26 11:47:22 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