Windows process terminates once the originating WSL terminal closes
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp, linux, ubuntu
- Área
- backend, operating-systems
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 34.4k
- Forks
- 1.9k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 166
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/WSL
-
feature wsl2
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
microsoft/WSL#42306 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/WSL#42114 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature kernel wsl2
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/WSL#41107 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature kernel
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/WSL#41054 · 9 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature GPU
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
microsoft/WSL#13592 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/WSL
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
HarperFast/rocksdb-js#1131 ·
Los mantenedores suelen responder en 1 día
-
area/daemon bug good first issue platform/linux priority/p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ToshiNamura/Deimos#5 ·
-
needs-format
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Niko1221/Strata#6251 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
[Bug]: NP 管理器文件编辑器里删除键无效Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
metasequoiaime/msime#11666 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
patrick-hudson/put.gd-desktop#1679 · 1 comentario ·
Los mantenedores suelen responder en 1 día