diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2014-02-25 15:00:47 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2014-02-25 15:00:47 +0000 |
commit | 5c3c870c6fc695010b7f9304a3a66f79cdbd1a09 (patch) | |
tree | 5dd6996b8f41ab513494ecaa795291055a91c2b9 /src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist | |
parent | 376f7e9de6bf4a9e6cd1f95fb71e6597b1436dde (diff) | |
download | VirtualBox-svn-5c3c870c6fc695010b7f9304a3a66f79cdbd1a09.tar.gz |
Installer/darwin: small optimization, do not go into the kill code if there is no VBoxXPCOMIPCD (not 100% correct as there could still be VBoxSVC lurking, but realistically that's good enough), as it avoids the sleep
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@50579 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist')
-rw-r--r-- | src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist index 607200ba130..0c39db839b1 100644 --- a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist @@ -65,7 +65,7 @@ event listeners to block VBoxSVC processes from exiting until the waiting time was elapsed. In the extreme case this was infinitely long, blocking updates. */ - system.run('/bin/sh', '-c', 'pids=`/usr/bin/pgrep VBoxXPCOMIPCD` rc=0; for i in $pids; do c=`/usr/sbin/lsof -p $i | /usr/bin/grep -E \'^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +unix\' | wc -l`; [ $c -le 2 ] || rc=1; done; if [ $rc -eq 0 ]; then pkill -KILL \'^(VirtualBox)|(VBoxNetDHCP)|(VBoxNetNAT)|(VBoxHeadless)|(VBoxXPCOMIPCD)|(VBoxSVC)$\'; sleep 1; fi'); + system.run('/bin/sh', '-c', 'pids=`/usr/bin/pgrep VBoxXPCOMIPCD` rc=0; [ -z "$pids" ] && rc=1; for i in $pids; do c=`/usr/sbin/lsof -p $i | /usr/bin/grep -E \'^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +unix\' | wc -l`; [ $c -le 2 ] || rc=1; done; if [ $rc -eq 0 ]; then pkill -KILL \'^(VirtualBox)|(VBoxNetDHCP)|(VBoxNetNAT)|(VBoxHeadless)|(VBoxXPCOMIPCD)|(VBoxSVC)$\'; sleep 1; fi'); } } catch (e) { system.log(e); } |