add `--lifecycle-bind-to <pid>`

Aperta
#173 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Start by locating the command entry points for bcvk ephemeral and bcvk libvirt run and how each currently monitors process or lifecycle status. Check the project’s existing tests for both commands, then investigate how pidfd_open can be used to monitor the supplied PID. Done means both commands accept --lifecycle-bind-to <pid> and exit when that process exits; the issue names no specific files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

For both bcvk ephemeral and bcvk libvirt run let's add --lifecycle-bind-to <pid> which would use pidfd_open and monitor that process' status, and when it exits we automatically exit as well.

The use case here is for things like test suites to replace code like this: https://github.com/bootc-dev/bootc/pull/1847/changes#diff-9b60649fe24ef1e3720f95723ad8b0da902c4c9d0071269e1958cdebadf4f157R39

A core problem with Drop impls in Rust (same with Go defer) is they don't get run on SIGINT (ctrl-c) by default and so really one gets pushed to doing cleanup in a more reliable way.

Lingua principale
Rust
Stelle
142
Fork
40
Merge medio
2g 22h
PR unite (30g)
10

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bootc-dev/bcvk

Tutte le issue di bootc-dev/bcvk

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.