VirtualBox

Changeset 92885 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 13, 2021 2:11:01 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148838
Message:

ValKit/vboxinstaller.py: Do 'sudo /bin/kill -9 pid' if utils.processKill fails and the process still exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py

    r92883 r92885  
    348348                             % ( iIteration, oProcess.iPid, oProcess.sImage if oProcess.sName is None else oProcess.sName,
    349349                                 oProcess.iUid, ));
    350                 utils.processKill(oProcess.iPid); # No mercy.
     350                if    not utils.processKill(oProcess.iPid) \
     351                  and sHostOs != 'windows' \
     352                  and utils.processExists(oProcess.iPid):
     353                    # Many of the vbox processes are initially set-uid-to-root and associated debuggers are running
     354                    # via sudo, so we might not be able to kill them unless we sudo and use /bin/kill.
     355                    utils.sudoProcessCall(['/bin/kill', '-9', '%s' % (oProcess.iPid,)]);
    351356
    352357            # Check if they're all dead like they should be.
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