VirtualBox

Changeset 92889 in vbox


Ignore:
Timestamp:
Dec 13, 2021 9:33:56 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148844
Message:

ValKit/utils.py: Better processExits for all unix platforms.

File:
1 edited

Legend:

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

    r92888 r92889  
    3535# Standard Python imports.
    3636import datetime;
     37import errno;
    3738import os;
    3839import platform;
     
    984985            hProcess.Close();
    985986            fRc = True;
    986     elif sHostOs == 'linux':
    987         fRc = os.path.exists('/proc/%s' % (uPid,));
    988987    else:
     988        fRc = False;
    989989        try:
    990990            os.kill(uPid, 0);
    991991            fRc = True;
    992         except: ## @todo check error code.
    993             fRc = False;
     992        except OSError as oXcpt:
     993            if oXcpt.errno == errno.EPERM:
     994                fRc = True;
     995        except:
     996            pass;
    994997    return fRc;
    995998
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