Improve error handling if process is killed
- Ngôn ngữ chính
- Emacs Lisp
- Star
- 236
- Fork
- 19
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Created as a response to .
If I understand the plz error handling code correctly, it currently only checks and reports if the curl process was killed if the returned error code is above 90. This intent is clarified in [a code comment](https://github.com/alphapapa/plz.el/blob/9fb22d84d9e39692392276d7b7b9979ca6ca1c01/plz.el#L870-L872).
However, on my machine, curl does not report an error code above 90 if the process is killed. In most cases, I see the error code 9, which normally means "FTP access denied", but seems to be mostly random here.
This can be confirmed with the following code snippet.
```emacs-lisp
(let ((p (start-process "test" nil "curl" "https://example.com")))
(kill-process p)
(run-with-timer 1 nil (lambda (p) (message "%s" (process-exit-status p))) p))
;; => prints "9" after 1 second
````
Killing the returned process seems to be the default way to "cancel" a request made using plz, so I think the current behavior is confusing. Also, there is clearly already code there to separately handle killed or interrupted processes, it just is never reached in my experience.
Best wishes
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.