If we already have an rc (eg from ao abort), keep it.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
v4: New patch in this version of the series.
if (status) {
libxl_report_child_exitstatus(CTX, XTL_ERROR, what, pid, status);
- shs->rc = ERROR_FAIL;
+ if (!shs->rc)
+ shs->rc = ERROR_FAIL;
}
if (shs->need_results) {
- if (!shs->rc)
+ if (!shs->rc) {
LOG(ERROR,"%s exited without providing results",what);
- shs->rc = ERROR_FAIL;
+ shs->rc = ERROR_FAIL;
+ }
}
if (!shs->completed) {
- if (!shs->rc)
+ if (!shs->rc) {
LOG(ERROR,"%s exited without signaling completion",what);
- shs->rc = ERROR_FAIL;
+ shs->rc = ERROR_FAIL;
+ }
}
helper_done(egc, shs);