Use another mechanism to return with the proper return code that does not
involve using exit(), but instead quits the application cleanly. Tested with a test script and works as expected. Should fix #5923. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36652 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,12 +13,15 @@
|
||||
#include "BootPromptWindow.h"
|
||||
|
||||
|
||||
static int sExitValue;
|
||||
|
||||
|
||||
int
|
||||
main(int, char **)
|
||||
{
|
||||
BootPromptApp app;
|
||||
app.Run();
|
||||
return 0;
|
||||
return sExitValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +43,12 @@ BootPromptApp::MessageReceived(BMessage* message)
|
||||
{
|
||||
switch (message->what) {
|
||||
case MSG_BOOT_DESKTOP:
|
||||
// TODO: Exit with some value that the Bootscript can deal with.
|
||||
exit(1);
|
||||
sExitValue = 1;
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
case MSG_RUN_INSTALLER:
|
||||
// TODO: Exit with some value that the Bootscript can deal with.
|
||||
exit(0);
|
||||
sExitValue = 0;
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user