Windows: Closing the installer loader doesn't terminate an aria2c download which is in progress
@drojf đang làm issue này rồi.
Từ ngày 14/7/2020.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Issue này nói về một vấn đề chấm dứt tiến trình đặc thù trên Windows, trong đó aria2c tiếp tục chạy sau khi giao diện GUI của bộ tải trình cài đặt đóng lại. Bản sửa lỗi liên quan đến việc sử dụng một JobObject thông qua thư viện Rust win32job-rs để đảm bảo các tiến trình con bị tiêu diệt. Hãy bắt đầu bằng cách kiểm tra mã Rust loader sinh ra aria2c, sau đó tích hợp việc đăng ký JobObject. Kiểm tra bằng cách chạy trình cài đặt, đóng bộ tải và xác minh rằng các tiến trình aria2c chấm dứt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 214
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của 07th-mod/python-patcher
-
SSL/TLS Errors Index PageĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
07th-mod/python-patcher#214 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
07th-mod/python-patcher#193 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
07th-mod/python-patcher#137 ·
-
enhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
07th-mod/python-patcher#83 ·
-
Missing cert on Fedora LinuxĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
07th-mod/python-patcher#80 · 11 bình luận ·
Tất cả issue của 07th-mod/python-patcher
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
druxt/umami.demo.druxtjs.org#527 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NuSkooler/enigma-bbs#907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày