Passing through signals when run with --appimage-extract-and-run
Chưa có ai nhận issue này.
Đá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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- linux
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Bắt đầu từ đường dẫn apprun được mô tả trong issue, tập trung vào cách fork và execv được sử dụng cho --appimage-extract-and-run so với việc thực thi bình thường. Theo dõi việc truyền tín hiệu từ AppImage do người dùng khởi chạy đến tiến trình con đã được giải nén, sau đó xác minh rằng SIGINT hoặc SIGQUIT đến được chương trình thực tế và cho phép quá trình dọn dẹp của chương trình chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the apprun,
when an appimage is called normally, execv is called in the parent branch of the fork, so the final process will get signals passed through to it.
However, when --appimage-extract-and-run is used, execv is call in the child branch of the fork. This means that signals sent to the process started by the user (i.e. the .AppImage itself) evaporate into thin air.
My preference would be that both modes of operation act the same way, and the process started by the user is the same process they send signals to.
The reason why I would want this is a bit more convoluted: I have an AppImage running inside a docker container. The base image for the container doesn't have FUSE available, so I run the appimage using --appimage-extract-and-run. In docker containers, PID 0 is always the actual program you want to run in the container - in my case, the appimage. When you stop a container, it can be configured so that the container will send a particular signal to PID 0 to trigger a cleanup. That signal (SIGINT or SIGQUIT in my case) isn't getting through, because it is stopping at the AppImage process, and not being passed on to the child. Eventually docker times out the stop command and sends SIGKILL which causes everything to exit hard, and the AppImage doesn't get to clean up it's temp directory.
Possible workarounds:
- I can work around this by not using an appimage at all, but then I have to solve a cross distribution library issue.
- I could change the build system version of linux to be a closer match to the docker container, or
- I could make a script to help the user figure out the correct process to shutdown instead of using docker stop.
It would be nice, however, if appimages always acted the same with with respect to signals being passed through to the actual program, whether or not they are runing extracted or with fuse.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 9.5k
- Fork
- 586
- 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
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 AppImage/AppImageKit
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
AppImage/AppImageKit#1428 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AppImage/AppImageKit#1164 · 2 bình luận · 1 reaction ·
-
request: organize prerequisitesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
AppImage/AppImageKit#1452 · 2 bình luận ·
-
request: silent modeĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
AppImage/AppImageKit#1450 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
AppImage/AppImageKit#1435 · 2 bình luận ·
Tất cả issue của AppImage/AppImageKit
Issue tương tự
-
easy enhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
lacs-project/sysknife#682 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
C-bug needs-triage O-UEFI T-libs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aristocratos/btop#1945 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100