Windows process terminates once the originating WSL terminal closes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp, linux, ubuntu
調査の方向性
Start by reading the reproduction steps and the related issue #11258; the payload does not identify source files or tests. Investigate how WSL handles Windows processes launched through $WSL_INTEROP when the originating terminal closes, then verify whether a process launched from a surviving tmux session remains alive after that terminal closes.
索引モデルが issue の本文から書いたものです。
説明
Windows Version
Microsoft Windows [Version 10.0.26200.9974]
WSL Version
2.7.13.0
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
- WSL 1
- WSLC
Kernel Version
6.18.33.2-2
Distro Version
Ubuntu 24.04
Other Software
> tmux -V
tmux 3.5
Repro Steps
- Start a Windows Terminal. Open an Ubuntu profile tab. Now:
> echo "$WSL_INTEROP"
/run/WSL/1297782_interop
- Start a Linux process (e.g.
tmuxhere) that stays alive after the Windows Terminal closes.
> tmux -L interop-test -f /dev/null new-session
Inside tmux:
> echo "$WSL_INTEROP"
/run/WSL/1297782_interop
> ps -p 1297782 -o pid,ppid,lstart,comm,args
PID PPID STARTED COMMAND COMMAND
1297782 1297781 Tue Nov 17 16:36:49 2026 Relay(1297784) /init
- Start a Windows process that is supposed to live long.
> powershell.exe -NoLogo -NoProfile
PS > $PID
1996
PS > Start-Sleep -Seconds 3600
- Start another Windows Terminal. Open a PowerShell tab. This is for monitoring. Run:
PS > cat .\test-script.ps1
$targetPid = 1996
$p = Get-Process -Id $targetPid -ErrorAction Stop
"Monitoring PID $($p.Id) ($($p.ProcessName))"
$p.WaitForExit()
"Process exited at $(Get-Date -Format o)"
"Exit code: $($p.ExitCode)"
PS > .\test-script.ps1
Monitoring PID 1996 (powershell)
- Close the Windows Terminal window with Ubuntu tab. In the PowerShell window, two more lines are printed:
Monitoring PID 1996 (powershell)
Process exited at 2026-11-17T16:41:32.2517195+09:00
Exit code:
- Start yet another Windows Terminal. Open an Ubuntu profile tab. Now:
> echo "$WSL_INTEROP"
/run/WSL/1328701_interop
> tmux -L interop-test -f /dev/null attach
Inside tmux, the powershell.exe process has stopped:
> powershell.exe -NoLogo -NoProfile
PS > $PID
1996
PS > Start-Sleep -Seconds 3600
> echo $?
1
> echo "$WSL_INTEROP"
/run/WSL/1297782_interop
> ps -p 1297782 -o pid,ppid,lstart,comm,args
PID PPID STARTED COMMAND COMMAND
> echo $?
1
Expected Behavior
The Windows process should remain running until it terminates normally or is explicitly stopped, even after the originating Windows Terminal is closed, provided that the tmux session remains alive.
Actual Behavior
Closing the originating Windows Terminal causes the Windows process to terminate immediately, as confirmed by an independent Windows PowerShell process monitoring its PID. The tmux session remains alive.
This appears related to #11258, which was automatically closed due to inactivity.
(Side note: Once the $WSL_INTEROP process is gone, we can still launch another Windows process from inside tmux. This process never stops by closing the window as long as the tmux session is alive.)
Diagnostic Logs
No response
- 主要言語
- C++
- スター
- 34.4k
- フォーク
- 1.9k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 166
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/WSL のほかの issue
-
feature wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
microsoft/WSL#42306 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/WSL#42114 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/WSL#41107 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/WSL#41054 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature GPU
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/WSL#13592 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/rocksdb-js#1131 ·
メンテナーはふだん 1 日以内に返信
-
area/daemon bug good first issue platform/linux priority/p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ToshiNamura/Deimos#5 ·
-
needs-format
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Niko1221/Strata#6251 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
metasequoiaime/msime#11666 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
patrick-hudson/put.gd-desktop#1679 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信