client: Fix error from changeset 14415 which caused Mac client to call daemon() if it was passed -daemon argument, causing problems using launchd with KeepAlive option; fixes #782.

svn path=/trunk/boinc/; revision=16565
This commit is contained in:
Charlie Fenton 2008-11-26 13:43:10 +00:00
parent 482f2a45d8
commit b5d88d4e8c
2 changed files with 17 additions and 4 deletions

View File

@ -9649,3 +9649,16 @@ David 25 Nov 2008
html/user/
get_project_config.php
Charlie 26 Nov 2008
- Mac: Add new source files TermsOfUsePage.cpp,.h to XCode project.
- client: Fix erroneous #else introduced in changeset 14415 which caused
Mac client to call daemon() if it was passed -daemon argument. This
caused problems when using launchd to launch the client as a daemon
with the keepAlive option set. Fixes #782.
client/
main.cpp
mac_build/
boinc.xcodeproj/
project.pbxproj

View File

@ -666,7 +666,7 @@ int main(int argc, char** argv) {
}
}
#elif defined __EMX__
#else
#elif ! defined (__APPLE__)
// non-Apple Unix
int i;
@ -749,8 +749,8 @@ int main(int argc, char** argv) {
SetBOINCDataOwnersGroupsAndPermissions();
}
#endif // _DEBUG && __APPLE__
i = check_security(g_use_sandbox, false);
if (i) {
int securityErr = check_security(g_use_sandbox, false);
if (securityErr) {
printf(
"File ownership or permissions are set in a way that\n"
"does not allow sandboxed execution of BOINC applications.\n"
@ -761,7 +761,7 @@ int main(int argc, char** argv) {
#else
" or run\n the shell script secure.sh"
#endif
". (Error code %d)\n", i
". (Error code %d)\n", securityErr
);
return ERR_USER_PERMISSION;
}