microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.45k stars 822 forks source link

nohup/tmux processes killed when last terminal closes #1007

Closed jarussell closed 6 years ago

jarussell commented 8 years ago

Running nohup sleep 10000 & or tmux +<prefix>d to detach only hang around until the last terminal is closed.

Programs run in tmux or nohup will last until they are killed by the user.

Processes are killed when the last terminal closes.

10.0.14393

run nohup sleep 10000 &, ps aux to ensure the process is running, close terminal, reopen and run ps aux again.

tmux or coreutils

rodrymbo commented 8 years ago

Welcome.

It's actually when the last Bash.exe console closes that the environment gets shut down, which is more of a distinction without a difference. Yeah, it's been noted and a fix requested. You can add your vote.

There are some workarounds, which mostly deal with ways to hide that last Bash.exe window so we don't accidentally close it by mistake. Once you have even one hidden Bash.exe window running, you can start lots of things in the background or as daemons. Not perfect, and I haven't seen a way to start things at Windows boot (only at Logon of the user).

834, #709, #612 etc

Brian-Perkins commented 6 years ago

Windows Insider Build 17046 allows programs to execute without an active terminal.

therealkenc commented 6 years ago

Available in Spring Creators.