Implement clean instance terminate when using systemd by benhillis · Pull Request #13552 · microsoft/WSL

Conversation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements clean instance termination when using systemd by refactoring the termination logic to allow systemd proper time to shut down before falling back to a hard reboot.

  • Extracts common termination logic into a new InitTerminateInstanceInternal function
  • Changes systemd command from systemctl reboot to systemctl poweroff
  • Adds timeout waiting for systemd to complete shutdown before forcing reboot

OneBlue

OneBlue

OneBlue

OneBlue

OneBlue

2 participants

@benhillis @OneBlue