[Pkg-privacy-commits] [msva-perl] 187/356: do not explicitly wait on the pid in question; just reap the zombies on SIGCHLD
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 947bca3a026dabe60781df1c30a8af54a0c76679
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Wed Oct 27 01:03:46 2010 -0400
do not explicitly wait on the pid in question; just reap the zombies on SIGCHLD
---
Crypt/Monkeysphere/MSVA.pm | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm
index ee71236..72061ab 100755
--- a/Crypt/Monkeysphere/MSVA.pm
+++ b/Crypt/Monkeysphere/MSVA.pm
@@ -610,16 +610,6 @@
my $server = shift;
$self->spawn_master_subproc($server);
- if (exists $self->{child_pid} &&
- $self->{child_pid} != 0) {
- my $val;
- while (defined($val = POSIX::waitpid(-1, POSIX::WNOHANG)) && $val > 0) {
- msvalog('debug', "waitpid on %d: got %d\n", $self->{child_pid}, $val);
- if ($val == $self->{child_pid}) {
- $self->master_subprocess_died($server, $?);
- }
- }
- }
}
sub master_subprocess_died {
@@ -716,7 +706,12 @@
} elsif ($#ARGV >= 0) {
$self->{child_pid} = 0; # indicate that we are planning to fork.
# avoid ignoring SIGCHLD right before we fork.
- $SIG{CHLD} = 'DEFAULT';
+ $SIG{CHLD} = sub {
+ my $val;
+ while (defined($val = POSIX::waitpid(-1, POSIX::WNOHANG)) && $val > 0) {
+ $self->child_dies($val, $server);
+ }
+ };
my $fork = fork();
if (! defined $fork) {
msvalog('error', "could not fork\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list