From b9f440262fa4e63ab934e13cd1ea466f7dd24bf7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 1 Feb 2009 00:07:20 +0000 Subject: [PATCH] -Have blade plugin die a little more gracefully in a hypothetical failure in SNMP processing, still needs to be more specific git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2685 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 66095cf43..a5b9ff10a 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -2190,8 +2190,12 @@ sub process_request { unless (defined($cpid)) { die "Fork error"; } unless ($cpid) { close($cfd); - dompa($pfd,$mpa,\%mpahash,$command,-args=>\@exargs); - exit(0); + eval { + dompa($pfd,$mpa,\%mpahash,$command,-args=>\@exargs); + exit(0); + }; + if ($@) { die "$@"; } + die "blade plugin encountered a general error while communication with $mpa"; } $mm_comm_pids{$cpid} = 1; close ($pfd);