Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows: Closing the installer loader doesn't terminate an aria2c download which is in progress

Aperta
#112 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@drojf ci sta già lavorando.

Dal 14/7/2020.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python, rust
Ambito
cli, desktop, tooling

Direzione di ricerca

Il problema riguarda un problema specifico di Windows nella terminazione dei processi, in cui aria2c continua dopo la chiusura della GUI del loader dell'installer. La soluzione prevede l'uso di un JobObject tramite la libreria Rust win32job-rs per assicurare che i processi figli vengano terminati. Inizia esaminando il codice del loader Rust che genera aria2c, quindi integra la registrazione del JobObject. Testa eseguendo l'installer, chiudendo il loader e verificando che i processi aria2c terminino.

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

Descrizione

bug

As per the title, if you close the installer loader (which should terminate the whole installer), it doesn't terminate the aria2c download. This is pretty bad, as it could result in both the download continuing when you don't expect it to, and also multiple aria2c downloads occurring simultaneously.

when running normally:

image

After closing the installer loader ("07th-mod Installer Launcher [v1.1.47]"):

image

  • make sure when the installer loader GUI is terminated ("07th-mod Installer Launcher [v1.1.47]") the whole proccess is terminated
  • double check the same doesn't happen with 7-zip extraction
  • double check that on other platforms, when the python script is run by itself without a loader, this can't happen (on windows, this seems to work if you run the installer just from the python script)
  • Add actual button to stop the download/extraction on the web UI

Edit: It looks like this issue has to do with the process being run with a (hidden) console. If you run the process with a console, it's not fully terminated until the console is killed. But we hide the console so as not to confuse users. This seems to make windows keep aria2c alive, as it sees the console window is still there.


Edit2: after trying out some things, I'm going to try this: https://stackoverflow.com/questions/23434842/python-how-to-kill-child-processes-when-parent-dies/23587108 . It's windows (or linux) specific, but at this stage I just want it to work.


Edit3: Registering a JobObject at the rust loader using this handy library: https://github.com/ohadravid/win32job-rs seems to fix the issue, but I'll just make sure everything is in order before I release a fix.

Lingua principale
JavaScript
Stelle
214
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 07th-mod/python-patcher

Tutte le issue di 07th-mod/python-patcher

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.