VirtualBox

Changeset 23608 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 7, 2009 8:41:52 PM (15 years ago)
Author:
vboxsync
Message:

VBoxService: Backed out r53279; just wait for SysprepRC in *any* case and then read SysprepRet eventually (if succeeded).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp

    r23607 r23608  
    389389                                VBoxServiceVerbose(3, "Exec: sysprep argv[%u]: \"%s\"\n", i, papszArgs[i]);
    390390
    391                             /*
    392                              * Status reporting via SysprepVBoxRC is required here in order to make a host program wait for it
    393                              * in any case (here, yet before the execution or down below if something failed). If no SysprepVBoxRC
    394                              * would be updated here the host wouldn't know if he now has to wait for SysprepRet (all succeded) or
    395                              * SysprepRC (something failed):
    396                              *
    397                              * 1. Host sets SysprepArgs
    398                              * 2. Host waits for a changing SysprepRC (this could be either here or in step 5)
    399                              * 3. If SysprepRC is successful go to 4, otherwise exit
    400                              * 4. Host waits for a changing SysprepRet (result of sysprep.exe execution)
    401                              * 5. Host waits for a changing SysprepRC (final result of operation)
    402                              */
    403                             rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc);
    404                             if (RT_FAILURE(rc))
    405                                 VBoxServiceError("Exec: Failed to write SysprepVBoxRC while setting up: rc=%Rrc\n", rc);
    406 
    407391                            RTPROCESS pid;
    408                             if (RT_SUCCESS(rc))
    409                                 rc = RTProcCreate(pszSysprepExec, papszArgs, RTENV_DEFAULT, 0 /*fFlags*/, &pid);
     392                            rc = RTProcCreate(pszSysprepExec, papszArgs, RTENV_DEFAULT, 0 /*fFlags*/, &pid);
    410393                            if (RT_SUCCESS(rc))
    411394                            {
     
    472455                rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc);
    473456                if (RT_FAILURE(rc))
    474                     VBoxServiceError("Exec: Failed to write final SysprepVBoxRC: rc=%Rrc\n", rc);
     457                    VBoxServiceError("Exec: Failed to write SysprepVBoxRC: rc=%Rrc\n", rc);
    475458            }
    476459        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette