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
This commit is contained in:
jbjohnso 2008-02-15 14:54:46 +00:00
parent dd794614c1
commit 91855f9af6

View File

@ -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;