Close stray process when stdio pipe is closed or possibly when parent process is killed (daemon flag?)
還沒有人認領這個 Issue。
評估
研究方向
先查看 issue #655 和 PR #663,接著追蹤 PSES 在 -stdio 模式和提議的 -daemon 旗標下的進入點。決定當父程序消失或 stdio 管線關閉時,預期的關閉行為為何;完成的標準是,在涵蓋的情境中不再殘留孤立的 PSES 程序,同時不影響 daemon 的使用。
由索引模型根據 Issue 內容生成。
描述
This is continuation of the effort from:
- Issue https://github.com/PowerShell/PowerShellEditorServices/issues/655 PSES needs to shutdown itself when it's supposed to
- PR https://github.com/PowerShell/PowerShellEditorServices/pull/663 Close stray processes on exit
#655 was closed by @TylerLeonhardt as it was satisfied by PR #663. However I still believe we can easily get into the situation when LSP text editor that launches PSES gets killed and orphans the PSES process, that keeps running without a purpose. Actually this is the case with Sublime Text and LSP plugin, where other language LSP providers shutdown themselves when the Sublime Text quits without a need to use exit or any other means.
Therefore I propose 2 options for consideration (alternatives):
-
Introduce new
-daemonflag, that unless specified, makes PSES to shutdown itself when the parent process disappears. This will make PSES behave like most of the command line tools, i.e. shutdown itself when the shell or launching process quits.The only purpose for PSES to run despite of parent process being alive or not is when it is it intended to be ran as a daemon, and I believe this intent should not be default (as it is now).
-
Shutdown itself when running as
-stdioand when pipe is closed, as I was commenting in other ticket, there is no point running when pipe is closes, because there is nobody that will be able to issueexitand any other command anyways.
Thank you in advance for considering my suggestion. If you prefer I can try to get this behavior adapter myself and send the PR, but you (maintainers) may come to more elegant solution much quicker than me, therefore I post this issue first.
- 主要語言
- C#
- 星號
- 767
- 分支
- 266
- 平均合併
- 3 天 16 小時
- 30 天內合併 PR
- 1
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/PowerShellEditorServices 的其他 Issue
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.可能重新可做 @andyleejordan 於 92 天前認領,目前沒有進行中的 PR。 未關閉
PowerShell/PowerShellEditorServices#2331 · 1 個 reaction · 已指派 2 人 ·
-
Area-Language Server Issue-Enhancement
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/PowerShellEditorServices#2315 · 1 則留言 ·
-
Improve Constrained Runspace Debug Experience可能已有人在做 @JustinGrote 於 115 天前認領。 未關閉Area-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 個 reaction · 已指派 2 人 ·
-
Issue-Bug Needs: Triage
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/PowerShellEditorServices#2293 · 1 則留言 ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)可能已有人在做 @JustinGrote 於 143 天前認領。 未關閉
PowerShell/PowerShellEditorServices#2282 · 1 則留言 · 1 個 reaction · 已指派 2 人 ·
查看 PowerShell/PowerShellEditorServices 的全部 Issue
相似的 Issue
-
.NET bug
難度 2/5 1-3 小時 新手友好度 86/100
RayWangQvQ/BiliBiliToolPro#1144 ·
維護者通常 1 天內回覆
-
area-System.Numerics.Tensors untriaged
難度 2/5 1-3 小時 新手友好度 78/100
dotnet/runtime#134691 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
microsoft/DataFactory.MCP#121 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
unoplatform/uno.templates#2277 ·
維護者通常 5 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/fluentui-blazor#5344 · 1 則留言 ·
維護者通常 1 天內回覆