From 1c43efabeee3ded252cd9274b2febdeaa28738ce Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 8 May 2009 18:11:59 +0000 Subject: [PATCH] -Prevent ipmi plugin from corrupting xCAT generic signal handler git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3327 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 94113b006..1c3437306 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -5996,12 +5996,6 @@ sub loadsdrcache { sub preprocess_request { - $SIG{INT} = $SIG{TERM} = sub { - foreach (keys %bmc_comm_pids) { - kill 2, $_; - } - exit 0; - }; my $request = shift; if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed my $callback=shift; @@ -6200,6 +6194,12 @@ sub process_request { } my $children = 0; + $SIG{INT} = $SIG{TERM} = sub { #prepare to process job termination and propogate it down + foreach (keys %bmc_comm_pids) { + kill 2, $_; + } + exit 0; + }; $SIG{CHLD} = sub {my $kpid; do { $kpid = waitpid(-1, WNOHANG); if ($bmc_comm_pids{$kpid}) { delete $bmc_comm_pids{$kpid}; $children--; } } while $kpid > 0; }; my $sub_fds = new IO::Select; foreach (@donargs) {