From 91855f9af6d82c0997c4ce3ba5fe6ca322cedd85 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 15 Feb 2008 14:54:46 +0000 Subject: [PATCH] Fix problem where backticks in plugins got no useful return code in 0 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@489 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/sbin/xcatd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 78687c395..66cb02fd6 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -551,6 +551,7 @@ sub plugin_command { if ($dispatch_requests) { dispatch_request($req,$callback,$modname); } else { + undef $SIG{CHLD}; ${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); } $$progname=$oldprogname; @@ -634,6 +635,7 @@ sub dispatch_request { #Since plugins may commonly experience this, a preprocess_request implementation #will for now be required for a command to be scaled through service nodes #If the plugin offers a preprocess method, use it to set the request array + undef $SIG{CHLD}; if (defined(${"xCAT_plugin::".$modname."::"}{preprocess_request})) { $reqs = ${"xCAT_plugin::".$modname."::"}{preprocess_request}->($req,$dispatch_cb,\&do_request); } else { #otherwise, pass it in without hierarchy support @@ -671,6 +673,7 @@ sub dispatch_request { syslog("local4|err","Error dispatching request: ".$@); } } else { + undef $SIG{CHLD}; ${"xCAT_plugin::".$modname."::"}{process_request}->($_,\&dispatch_callback,\&do_request); } exit;