vp run forwards no signal to its task, so stopping vp alone orphans the task
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 6k
- Forks
- 274
- Merge moyen
- 1 j 12 h
- PR mergées (30 j)
- 205
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de voidzero-dev/vite-plus
-
pending triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
voidzero-dev/vite-plus#2882 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
voidzero-dev/vite-plus#2097 · 10 commentaires · 2 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
pending triage
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
voidzero-dev/vite-plus#3092 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
voidzero-dev/vite-plus#3091 ·
Les mainteneurs répondent en général sous 1 jour
-
`vp migrate` copies string `extends` paths from `.oxlintrc.json` into `lint`, which `vp lint` rejectsPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
voidzero-dev/vite-plus#3089 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de voidzero-dev/vite-plus
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
pop-os/cosmic-comp#2956 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
libp2p/rust-libp2p#6694 ·
Les mainteneurs répondent en général sous 1 jour
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
EmbarkStudios/cargo-deny#910 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
tursodatabase/turso#10054 ·
Les mainteneurs répondent en général sous 1 jour
-
build: Update rust versionPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertedependencies
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
ibm-granite-community/granite-cli#229 ·
Les mainteneurs répondent en général sous 1 jour