Hello community, here is the log from the commit of package perl-Net-Daemon checked in at Thu Oct 26 20:28:02 CEST 2006. -------- --- perl-Net-Daemon/perl-Net-Daemon.changes 2006-01-25 21:39:51.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-Net-Daemon/perl-Net-Daemon.changes 2006-10-25 09:32:21.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Oct 25 09:31:45 CEST 2006 - ug@suse.de + +- Update to version 0.39 +- a testsuite fixed + +------------------------------------------------------------------- Old: ---- Net-Daemon-0.38.tar.bz2 New: ---- Net-Daemon-0.39.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-Daemon.spec ++++++ --- /var/tmp/diff_new_pack.KkQwka/_old 2006-10-26 20:27:41.000000000 +0200 +++ /var/tmp/diff_new_pack.KkQwka/_new 2006-10-26 20:27:41.000000000 +0200 @@ -1,25 +1,24 @@ # -# spec file for package perl-Net-Daemon (Version 0.38) +# spec file for package perl-Net-Daemon (Version 0.39) # -# Copyright (c) 2004 SuSE Linux AG, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild -# usedforbuild aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils gcc gdbm gettext libtool perl rpm Name: perl-Net-Daemon %define INSTALL install -m755 -s %define INSTALL_DIR install -d -m755 %define INSTALL_DATA install -m644 -License: GPL +License: GNU General Public License (GPL) - all versions Group: Development/Libraries/Perl Summary: Net::Daemon - Perl extension for portable daemons -Version: 0.38 -Release: 0 +Version: 0.39 +Release: 1 Source: Net-Daemon-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: perl = %{perl_version} @@ -60,6 +59,9 @@ /var/adm/perl-modules/%{name} %changelog -n perl-Net-Daemon +* Wed Oct 25 2006 - ug@suse.de +- Update to version 0.39 +- a testsuite fixed * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Sun Jan 18 2004 - nashif@suse.de ++++++ Net-Daemon-0.38.tar.bz2 -> Net-Daemon-0.39.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/ChangeLog new/Net-Daemon-0.39/ChangeLog --- old/Net-Daemon-0.38/ChangeLog 2003-11-10 07:30:28.000000000 +0100 +++ new/Net-Daemon-0.39/ChangeLog 2006-02-15 09:49:34.000000000 +0100 @@ -1,3 +1,11 @@ +2006-02-15 Jochen Wiedmann <jwied@cpan.org> (0.39) + + * t/forkm.t: Hopefully, I finally got rid of the + problem with the forking tests. It seems, that + the perlipc manual got updated in the past years, + most possibly for the same reason: A child handler + must be written to catch childs in a loop. + 2003-11-10 Jochen Wiedmann <joe@ispsoft.de> (0.38) * lib/Net/Daemon.pm: It is now possible to specify diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/MANIFEST new/Net-Daemon-0.39/MANIFEST --- old/Net-Daemon-0.38/MANIFEST 2003-11-10 07:29:42.000000000 +0100 +++ new/Net-Daemon-0.39/MANIFEST 2006-02-15 09:49:41.000000000 +0100 @@ -20,3 +20,4 @@ t/thread.t Test of a multithreaded server t/threadm.t Test of a multithreaded server with multiple clients t/unix.t Test for Unix sockets +META.yml Module meta-data (added by MakeMaker) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/META.yml new/Net-Daemon-0.39/META.yml --- old/Net-Daemon-0.38/META.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/Net-Daemon-0.39/META.yml 2006-02-15 09:54:49.000000000 +0100 @@ -0,0 +1,10 @@ +# http://module-build.sourceforge.net/META-spec.html +#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# +name: Net-Daemon +version: 0.39 +version_from: lib/Net/Daemon.pm +installdirs: site +requires: + +distribution_type: module +generated_by: ExtUtils::MakeMaker version 6.17 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/README new/Net-Daemon-0.39/README --- old/Net-Daemon-0.38/README 2003-11-10 07:29:42.000000000 +0100 +++ new/Net-Daemon-0.39/README 2006-02-15 09:49:43.000000000 +0100 @@ -30,8 +30,8 @@ Two constructors are available: The new method is called upon startup and creates an object that will basically act as an anchor over the - complete program. It supports command line parsing via "Getopt::Long - (3)". + complete program. It supports command line parsing via "Getopt::Long + (3)". Arguments of new are *$attr*, an hash ref of attributes (see below) and *$options* an array ref of options, typically command line arguments @@ -71,22 +71,22 @@ An array ref with a list of clients. Clients are hash refs, the attributes *accept* (0 for denying access and 1 for permitting) and *mask*, a Perl regular expression for the clients IP number or its - host name. See "Access control" below. + host name. See "Access control" below. *configfile* (--configfile=file) Net::Daemon supports the use of config files. These files are assumed to contain a single hash ref that overrides the arguments of the new method. However, command line arguments in turn take - precedence over the config file. See the "Config File" section below - for details on the config file. + precedence over the config file. See the "Config File" section below + for details on the config file. *debug* (--debug) Turn debugging mode on. Mainly this asserts that logging messages of level "debug" are created. *facility* (--facility=mode) - (UNIX only) Facility to use for "Sys::Syslog (3)". The default is - daemon. + (UNIX only) Facility to use for "Sys::Syslog (3)". The default is + daemon. *group* (--group=gid) After doing a bind(), change the real and effective GID to the @@ -145,8 +145,8 @@ If you are running Perl 5.005 and did compile it for threads, then the server will create a new thread for each connection. The thread will execute the server's Run() method and then terminate. This mode - is the default, you can force it with "--mode=ithreads" or - "--mode=threads". + is the default, you can force it with "--mode=ithreads" or + "--mode=threads". If threads are not available, but you have a working fork(), then the server will behave similar by creating a new process for each @@ -305,16 +305,16 @@ $server->Error($format, @args); $server->Fatal($format, @args); - The Log method is an interface to "Sys::Syslog (3)" or "Win32::EventLog - (3)". It's arguments are *$level*, a syslog level like debug, notice or - err, a format string in the style of printf and the format strings + The Log method is an interface to "Sys::Syslog (3)" or "Win32::EventLog + (3)". It's arguments are *$level*, a syslog level like debug, notice or + err, a format string in the style of printf and the format strings arguments. The Debug and Error methods are shorthands for calling Log with a level of debug and err, respectively. The Fatal method is like Error, except it additionally throws the given message as exception. - See Net::Daemon::Log(3) for details. + See Net::Daemon::Log(3) for details. Flow of control $server->Bind(); @@ -347,7 +347,7 @@ the exception being the OpenLog method which is invoked before threading starts. Thus you are safe as long as you don't share handles between threads. I strongly recommend that your application behaves similar. - (This doesn't apply to mode 'ithreads'.) + (This doesn't apply to mode 'ithreads'.) EXAMPLE As an example we'll write a simple calculator server. After connecting @@ -471,6 +471,6 @@ Perl README file. SEE ALSO - RPC::pServer(3), Netserver::Generic(3), Net::Daemon::Log(3), - Net::Daemon::Test(3) + RPC::pServer(3), Netserver::Generic(3), Net::Daemon::Log(3), + Net::Daemon::Test(3) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/lib/Net/Daemon.pm new/Net-Daemon-0.39/lib/Net/Daemon.pm --- old/Net-Daemon-0.38/lib/Net/Daemon.pm 2003-11-10 07:29:42.000000000 +0100 +++ new/Net-Daemon-0.39/lib/Net/Daemon.pm 2006-02-15 09:46:30.000000000 +0100 @@ -33,7 +33,7 @@ package Net::Daemon; -$Net::Daemon::VERSION = '0.38'; +$Net::Daemon::VERSION = '0.39'; @Net::Daemon::ISA = qw(Net::Daemon::Log); # diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-Daemon-0.38/t/forkm.t new/Net-Daemon-0.39/t/forkm.t --- old/Net-Daemon-0.38/t/forkm.t 2001-04-08 16:50:15.000000000 +0200 +++ new/Net-Daemon-0.39/t/forkm.t 2006-02-15 09:53:05.000000000 +0100 @@ -9,6 +9,20 @@ use Fcntl (); use Config (); + +my $debug = 0; +my $dh; +if ($debug) { + $dh = Symbol::gensym(); + open($dh, ">", "forkm.log") or die "Failed to open forkm.log: $!"; +} + +sub log($) { + my $msg = shift; + print $dh "$$: $msg\n" if $dh; +} + +&log("Start"); my $ok; eval { if ($^O ne "MSWin32") { @@ -20,6 +34,7 @@ } }; if (!$ok) { + &log("!ok"); print "1..0\n"; exit; } @@ -47,10 +62,12 @@ sub ReadWrite { my $fh = shift; my $i = shift; my $j = shift; + &log("ReadWrite: -> fh=$fh, i=$i, j=$j"); if (!$fh->print("$j\n") || !$fh->flush()) { die "Child $i: Error while writing $j: " . $fh->error() . " ($!)"; } my $line = $fh->getline(); + &log("ReadWrite: line=$line"); die "Child $i: Error while reading: " . $fh->error() . " ($!)" unless defined($line); my $num; @@ -58,16 +75,20 @@ unless defined($num = IsNum($line)); die "Child $i: Expected " . ($j*2) . ", got $num" unless $j*2 == $num; + &log("ReadWrite: <-"); } sub MyChild { my $i = shift; + &log("MyChild: -> $i"); + eval { my $fh = IO::Socket::INET->new('PeerAddr' => '127.0.0.1', 'PeerPort' => $port); if (!$fh) { + &log("MyChild: Cannot connect: $!"); die "Cannot connect: $!"; } for (my $j = 0; $j < 1000; $j++) { @@ -76,13 +97,16 @@ }; if ($@) { print STDERR "Client: Error $@\n"; + &log("MyChild: Client: Error $@"); return 0; } + &log("MyChild: <-"); return 1; } sub ShowResults { + &log("ShowResults: ->"); my @results; for (my $i = 1; $i <= 10; $i++) { $results[$i-1] = "not ok $i\n"; @@ -97,28 +121,38 @@ for (my $i = 1; $i <= 10; $i++) { print $results[$i-1]; } + &log("ShowResults: <-"); exit 0; } my %childs; sub CatchChild { - my $pid = wait; - if (exists $childs{$pid}) { - delete $childs{$pid}; - ShowResults() if (keys(%childs) == 0); + &log("CatchChild: ->"); + for(;;) { + my $pid = wait; + if ($pid > 0) { + &log("CatchChild: $pid"); + if (exists $childs{$pid}) { + delete $childs{$pid}; + ShowResults() if (keys(%childs) == 0); + } + } } $SIG{'CHLD'} = \&CatchChild; + &log("CatchChild: <-"); } $SIG{'CHLD'} = \&CatchChild; # Spawn 10 childs, each of them running a series of test unlink "log"; +&log("Spawning childs"); for (my $i = 0; $i < 10; $i++) { if (defined(my $pid = fork())) { if ($pid) { # This is the parent $childs{$pid} = $i; } else { + &log("Child starting"); # This is the child undef $handle; %childs = (); @@ -145,6 +179,7 @@ } END { + &log("END: -> handle=" . (defined($handle) ? $handle : "undef")); if ($handle) { $handle->Terminate(); undef $handle; @@ -154,5 +189,6 @@ } %childs = (); unlink "ndtest.prt"; + &log("END: <-"); exit 0; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de