VirtualBox

Changeset 107964 in vbox for trunk/src/VBox/Installer/linux


Ignore:
Timestamp:
Jan 28, 2025 2:18:42 PM (7 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167214
Message:

Installer: Linux: Ask VBoxSVC to terminate gacefully and wait for it if it is running during installation, bugref:10850.

This behavior was in place before, however we did not send SIGUSR1 to VBoxSVC
in case of .run installer (or did it in condition which was never true) and we
were waiting too litle to give it a chance to terminate.

Location:
trunk/src/VBox/Installer/linux
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/debian/preinst

    r106061 r107964  
    6565  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
    6666  if [ -n "$VBOXSVC_PID" ]; then
    67     # ask the daemon to terminate immediately
     67    # Ask VBoxSVC to terminate gracefully if it is not
     68    # busy with handling client requests.
    6869    kill -USR1 $VBOXSVC_PID
    69     sleep 1
     70    # Wait for VBoxSVC to terminate.
     71    for attempt in 1 2 3 4 5 6 7 8 9 10; do
     72      [ -n "$(pidof VBoxSVC 2> /dev/null)" ] && sleep 1
     73    done
     74    # Still running?
    7075    if pidof VBoxSVC > /dev/null 2>&1; then
    7176      db_fset virtualbox/old-running seen false || true
  • trunk/src/VBox/Installer/linux/routines.sh

    r106061 r107964  
    127127    VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null`
    128128    if [ -n "$VBOXSVC_PID" ]; then
    129         if [ -f /etc/init.d/vboxweb-service ]; then
    130             kill -USR1 $VBOXSVC_PID
    131         fi
    132         sleep 1
     129        # Ask VBoxSVC to terminate gracefully if it is not
     130        # busy with handling client requests.
     131        kill -USR1 $VBOXSVC_PID
     132        # Wait for VBoxSVC to terminate.
     133        for attempt in 1 2 3 4 5 6 7 8 9 10; do
     134            [ -n "$(pidof VBoxSVC 2> /dev/null)" ] && sleep 1
     135        done
     136        # Still running?
    133137        if pidof VBoxSVC > /dev/null 2>&1; then
    134138            echo 1>&2 "A copy of VirtualBox is currently running.  Please close it and try again."
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r106617 r107964  
    261261VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
    262262if [ -n "$VBOXSVC_PID" ]; then
    263   # ask the daemon to terminate immediately
     263  # Ask VBoxSVC to terminate gracefully if it is not
     264  # busy with handling client requests.
    264265  kill -USR1 $VBOXSVC_PID
    265   sleep 1
     266  # Wait for VBoxSVC to terminate.
     267  for attempt in 1 2 3 4 5 6 7 8 9 10; do
     268    [ -n "$(pidof VBoxSVC 2> /dev/null)" ] && sleep 1
     269  done
     270  # Still running?
    266271  if pidof VBoxSVC > /dev/null 2>&1; then
    267272    echo "A copy of VirtualBox is currently running.  Please close it and try again."
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