VirtualBox

Changeset 93149 in vbox for trunk/src


Ignore:
Timestamp:
Jan 8, 2022 3:59:30 PM (3 years ago)
Author:
vboxsync
Message:

Main/Unattended/os2_util: Try avoid triggering ERROR_SMG_START_IN_BACKGROUND and deal with it (it's a warning) when it occurs.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-helper-apps/os2/os2_util.c

    r93126 r93149  
    829829        }
    830830        if (hPipeRead != -1)
     831        {
    831832            pidChild = ResultCodes.codeTerminate;
     833            MyOutStr("info: started pid ");
     834            MyOutNum(pidChild);
     835            MyOutStr("\r\n");
     836        }
    832837    }
    833838    else
     
    861866        u.StartData.Length        = sizeof(u.StartData);
    862867        u.StartData.Related       = 1 /* SSF_RELATED_CHILD */;
    863         u.StartData.FgBg          = 0 /* SSF_FGBG_FORE */;
     868        u.StartData.FgBg          = (uExeType & FAPPTYP_TYPE_MASK) == PT_PM
     869                                  ? 1 /* SSF_FGBG_BACK - try avoid ERROR_SMG_START_IN_BACKGROUND */
     870                                  : 0 /* SSF_FGBG_FORE */;
    864871        u.StartData.TraceOpt      = 0 /* SSF_TRACEOPT_NONE */;
    865872        u.StartData.PgmTitle      = NULL;
     
    885892
    886893        rc = DosStartSession(&u.StartData, &idSession, &pidChild);
    887         if (rc != NO_ERROR)
     894        if (rc != NO_ERROR && rc != ERROR_SMG_START_IN_BACKGROUND)
    888895        {
    889896            DosCloseQueue(hQueue);
    890897            MyApiError3AndQuit("DosStartSession for \"", pszExe, "\"", rc);
     898        }
     899
     900        if (1)
     901        {
     902            MyOutStr("info: started session ");
     903            MyOutNum(idSession);
     904            MyOutStr(", pid ");
     905            MyOutNum(pidChild);
     906            MyOutStr("\r\n");
    891907        }
    892908    }
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