The exit code is 0 while a WSL restart is pending

オープン 初心者向け
#194 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
powershell
領域
cli

調査の方向性

steps/_reboot-resume.ps1から始め、特に再開タスクと再起動コマンドを処理する58~72行目を確認してください。shutdown.exeの成功経路と失敗経路をたどり、再起動待ちと再起動失敗を示すために、どの異なる終了コードを使うべきかを判断してください。呼び出し側が終了コードによってこれらの結果を区別でき、必要に応じてカバレッジまたはドキュメントが更新されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

When WSL needs a restart, steps/_reboot-resume.ps1 registers the resume task, runs shutdown.exe /r /t 0 /f, sleeps and exit 0. If shutdown fails it waits for a key and also exits 0 (lines 58-72 on main @ 2ac20c5).

A caller can't tell "finished" from "restarting, more to do" from the exit code. It has to read the log (WSL needs a restart to finish) and look for a WindowsDevConfigResume* scheduled task to know the run isn't done.

Proposal: exit with a distinct code when a restart is pending (for example 3010, ERROR_SUCCESS_REBOOT_REQUIRED) and another when the restart couldn't be started, or record it in a result file (see #193).

主要言語
PowerShell
スター
3.5k
フォーク
239
平均マージ
6時間 3分
マージ済み PR(30日)
37

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/WindowsDeveloperConfig のほかの issue

microsoft/WindowsDeveloperConfig の issue をすべて見る

似ている issue

CLI の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。