VirtualBox

Changeset 39863 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jan 24, 2012 9:06:15 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75889
Message:

process-win.cpp: Do not return failure because UnloadUserProfile failed - we have got a running "child" process! Just assert. Added todo regarding confused flow around pfnCreateProcessWithLogonW.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/process-win.cpp

    r39846 r39863  
    768768     * we're running as a Windows service?
    769769     */
    770     if (   RT_FAILURE(rc)
     770    if (   RT_FAILURE(rc) /** @todo r=bird: you don't set rc when pfnCreateProcesswithLogonW fails... Using too many variables to control flow is confusing. */
    771771        || (fFlags & RTPROC_FLAGS_SERVICE))
    772772    {
     
    935935                                    rtProcEnvironmentDestroy(pwszzBlock);
    936936                                }
    937                                 else
    938                                     dwErr = rc;
    939937
    940938                                if (!(fFlags & RTPROC_FLAGS_NO_PROFILE))
    941939                                {
    942940                                    fRc = pfnUnloadUserProfile(*phToken, profileInfo.hProfile);
     941#ifdef RT_STRICT
    943942                                    if (!fRc)
    944943                                    {
    945                                         /* In case there were some handles left open, we want to know about
    946                                          * that -- can be tricky to debug later! */
    947944                                        DWORD dwErr2 = GetLastError();
    948                                         AssertMsgFailed(("Unloading user profile failed with error %u (%#x)", dwErr2, dwErr2));
    949                                         if (dwErr == NO_ERROR)
    950                                             dwErr = dwErr2;
     945                                        AssertMsgFailed(("Unloading user profile failed with error %u (%#x) - Are all handles closed? (dwErr=%u)",
     946                                                         dwErr2, dwErr2, dwErr));
    951947                                    }
     948#endif
    952949                                }
    953950                            }
Note: See TracChangeset for help on using the changeset viewer.

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