From 3a4cefe53b58c4392f95617613dc4485e2c4349b Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 19 Nov 2014 07:44:17 -0500 Subject: [PATCH] defect 4336,4352: in xcatd, for aix, make all the process (fix for udp process) to be stopped when received TERM singal from stopsrc command to the main process --- xCAT-server/sbin/xcatd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 597ac84e1..25ee8462e 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -977,6 +977,15 @@ unless ($pid_UDP) { xexit(0); } close($udpbroker); + + $SIG{TERM} = $SIG{INT} = sub { + if ($pid_disco) { + kill 2, $pid_disco; + } + $SIG{ALRM} = sub { xexit 0; }; #die "Did not close out in time for 2 second grace period"; }; + alarm(2); + }; + do_udp_service(discoctl=>$discoctl,discopid=>$pid_disco); xexit(0); }