mirror of https://github.com/BOINC/boinc.git
- wrapper: if a child exits with nonzero status X,
call boinc_finish() with ERR_CHILD_FAILED rather than X. If X is zero in the low-order byte (e.g. if the program isn't executable) the BOINC client will restart us, which isn't what we want. svn path=/trunk/boinc_samples/; revision=14858
This commit is contained in:
parent
1e1c8ee5bf
commit
480f497e03
|
@ -543,3 +543,13 @@ Charlie 21 Feb 2008
|
|||
mac/
|
||||
uc2_graphics.icns
|
||||
app_icon.h
|
||||
|
||||
David 6 Mar 2008
|
||||
- wrapper: if a child exits with nonzero status X,
|
||||
call boinc_finish() with ERR_CHILD_FAILED rather than X.
|
||||
If X is zero in the low-order byte
|
||||
(e.g. if the program isn't executable)
|
||||
the BOINC client will restart us, which isn't what we want.
|
||||
|
||||
wrapper/
|
||||
wrapper.C
|
||||
|
|
|
@ -490,8 +490,14 @@ int main(int argc, char** argv) {
|
|||
int status;
|
||||
if (task.poll(status)) {
|
||||
if (status) {
|
||||
fprintf(stderr, "app error: 0x%x\n", status);
|
||||
boinc_finish(status);
|
||||
fprintf(stderr, "app exit status: 0x%x\n", status);
|
||||
// On Unix, if the app is non-executable,
|
||||
// the child status will be 0x6c00.
|
||||
// If we return this the client will treat it
|
||||
// as recoverable, and restart us.
|
||||
// We don't want this, so return an 8-bit error code.
|
||||
//
|
||||
boinc_finish(ERR_CHILD_FAILED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue