VirtualBox

Ignore:
Timestamp:
Mar 15, 2022 11:59:37 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: More code to handle host process execution in a separate thread to not block required event processing [build fix, forgot to commit stuff]. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r94123 r94244  
    675675    return subprocess.Popen(*aPositionalArgs, **dKeywordArgs);  # pylint: disable=consider-using-with
    676676
     677def processStart(*aPositionalArgs, **dKeywordArgs):
     678    """
     679    Wrapper around subprocess.Popen to deal with its absence in older
     680    python versions.
     681    Returns process object on success which can be worked on.
     682    """
     683    _processFixPythonInterpreter(aPositionalArgs, dKeywordArgs);
     684    return processPopenSafe(*aPositionalArgs, **dKeywordArgs);
     685
    677686def processCall(*aPositionalArgs, **dKeywordArgs):
    678687    """
     
    683692    assert dKeywordArgs.get('stdout') is None;
    684693    assert dKeywordArgs.get('stderr') is None;
    685     _processFixPythonInterpreter(aPositionalArgs, dKeywordArgs);
    686     oProcess = processPopenSafe(*aPositionalArgs, **dKeywordArgs);
     694    oProcess = processStart(*aPositionalArgs, **dKeywordArgs);
    687695    return oProcess.wait();
    688696
     
    797805    return None;
    798806
     807
     808def sudoProcessStart(*aPositionalArgs, **dKeywordArgs):
     809    """
     810    sudo (or similar) + subprocess.Popen,
     811    returning the process object on success.
     812    """
     813    _processFixPythonInterpreter(aPositionalArgs, dKeywordArgs);
     814    _sudoFixArguments(aPositionalArgs, dKeywordArgs);
     815    return processStart(*aPositionalArgs, **dKeywordArgs);
    799816
    800817def sudoProcessCall(*aPositionalArgs, **dKeywordArgs):
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