VirtualBox

Changeset 93036 in vbox


Ignore:
Timestamp:
Dec 21, 2021 9:29:38 AM (3 years ago)
Author:
vboxsync
Message:

Guest Control/Main: Let GuestProcess::i_terminateProcess() return a dedicated status when process (already) is in a terminated / wrong status, so that caller can react based on that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r92916 r93036  
    13211321 *
    13221322 * @returns VBox status code.
     1323 * @retval  VWRN_INVALID_STATE if process not in running state (anymore).
     1324 * @retval  VERR_NOT_SUPPORTED if process termination is not supported on the guest.
    13231325 * @param   uTimeoutMS          Timeout (in ms) to wait for process termination.
    13241326 * @param   prcGuest            Where to return the guest error when VERR_GSTCTL_GUEST_ERROR
     
    13401342        LogFlowThisFunc(("Process not in started state (state is %RU32), skipping termination\n",
    13411343                         mData.mStatus));
     1344        vrc = VWRN_INVALID_STATE;
    13421345    }
    13431346    else
     
    20452048    }
    20462049
    2047     /* Remove process from guest session list. Now only API clients
    2048      * still can hold references to it. */
    2049     AssertPtr(mSession);
    2050     int rc2 = mSession->i_processUnregister(this);
    2051     if (RT_SUCCESS(vrc))
    2052         vrc = rc2;
     2050    if (vrc == VINF_SUCCESS) /* Note: Also could be VWRN_INVALID_STATE from i_terminateProcess(). */
     2051    {
     2052        /* Remove process from guest session list. Now only API clients
     2053         * still can hold references to it. */
     2054        AssertPtr(mSession);
     2055        int rc2 = mSession->i_processUnregister(this);
     2056        if (RT_SUCCESS(vrc))
     2057            vrc = rc2;
     2058    }
    20532059
    20542060    LogFlowFuncLeaveRC(vrc);
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