vp run forwards no signal to its task, so stopping vp alone orphans the task
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the comment at crates/vt/src/session/mod.rs:382-388, which says child tasks receive signals from the terminal driver, and trace how vp run spawns tasks and handles signals in the local CLI and the global vp wrapper. Reproduce by running vp run dev and sending SIGTERM to the vp pid alone. The issue is open on a choice between forwarding signals and documenting process-group signalling, so confirm the maintainers' preferred direction before writing code.
索引モデルが issue の本文から書いたものです。
説明
Description
vp run <script> forwards no signal to the task it runs. A SIGINT or SIGTERM sent to the vp process alone ends vp, and the script's process keeps running, reparented to init or the user manager. A Ctrl-C in a terminal works only because the terminal sends it to the whole process group. Tools that stop a job by signalling the process they started leave the task running. That includes kill <pid> from a script, a supervisor, or an editor or agent harness that started vp run dev as a background command.
Tested on vite-plus 1.2.0 (global vp and the local CLI), on Linux:
| Signal sent to | Result |
|---|---|
global vp, SIGINT or SIGTERM |
vp exits; the task keeps running |
| local CLI, SIGTERM | the CLI exits; the task is orphaned |
| local CLI, SIGINT | ignored |
| the whole process group | everything exits |
This looks deliberate. vite-task at 9ba4cc93, crates/vt/src/session/mod.rs:382-388, says "Child tasks receive the signal directly from the terminal driver". The docs don't mention it, though.
Suggested solution
Forward SIGINT, SIGTERM and SIGHUP from vp to each running task, then wait for the tasks to exit. This is what npm run does (@npmcli/run-script lib/signal-manager.js), and what Turborepo (turborepo-signals) and concurrently (kill-on-signal.ts) do.
The global vp would also need to pass the signal on to the local CLI it starts.
Alternative
Document that vp run must be stopped by signalling its process group, so that harnesses and scripts can do that.
Additional context
We hit this with a long-running dev script that supervises several servers. Stopping vp alone left all of them running and holding their ports. We now tell agents to signal the script's own process instead.
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature. I searched vite-plus and vite-task for signal, SIGINT, SIGTERM, kill, orphan and process group.
- 主要言語
- Rust
- スター
- 6.3k
- フォーク
- 283
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 200
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/vite-plus のほかの issue
-
contribution welcome
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
voidzero-dev/vite-plus#3096 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#2882 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
voidzero-dev/vite-plus#2097 · コメント 10 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#3102 ·
メンテナーはふだん 1 日以内に返信
-
`vp run`: Terminal UI for parallel/persistent tasks with per-task log panes (like Turborepo's TUI)オープンpending triage
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
voidzero-dev/vite-plus#3098 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/vite-plus の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nautechsystems/nautilus_trader#5365 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
IntersectMBO/developer-experience#347 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
registrystack/registry-stack#2168 ·
メンテナーはふだん 1 日以内に返信
-
bug crate: 3d help wanted triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kornia/kornia-rs#1203 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信