Windows: Closing the installer loader doesn't terminate an aria2c download which is in progress
@drojf ci sta già lavorando.
Dal 14/7/2020.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
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
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:

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

- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 07th-mod/python-patcher
-
SSL/TLS Errors Index Page Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
07th-mod/python-patcher#214 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
07th-mod/python-patcher#193 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
07th-mod/python-patcher#137 ·
-
enhancement help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
07th-mod/python-patcher#83 ·
-
Missing cert on Fedora Linux Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
07th-mod/python-patcher#80 · 11 commenti ·
Tutte le issue di 07th-mod/python-patcher
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Improve Title Support Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·