|
@@ -8740,20 +8740,15 @@ If the file does not exist, throw an error."
|
|
|
(save-window-excursion
|
|
|
(message "Running %s...done" cmd)
|
|
|
;; Handlers such as "gio open" and kde-open5 start viewer in background
|
|
|
- ;; and exit immediately. Avoid `start-process' since it assumes
|
|
|
- ;; :connection-type 'pty and kills children processes with SIGHUP
|
|
|
- ;; when temporary terminal session is finished.
|
|
|
- (make-process
|
|
|
- :name "org-open-file" :connection-type 'pipe :noquery t
|
|
|
- :buffer nil ; use "*Messages*" for debugging
|
|
|
- :sentinel (lambda (proc event)
|
|
|
- (when (and (memq (process-status proc) '(exit signal))
|
|
|
- (/= (process-exit-status proc) 0))
|
|
|
- (message
|
|
|
- "Command %s: %s."
|
|
|
- (mapconcat #'identity (process-command proc) " ")
|
|
|
- (substring event 0 -1))))
|
|
|
- :command (list shell-file-name shell-command-switch cmd))
|
|
|
+ ;; and exit immediately. Use pipe connnection type instead of pty to
|
|
|
+ ;; avoid killing children processes with SIGHUP when temporary terminal
|
|
|
+ ;; session is finished.
|
|
|
+ ;;
|
|
|
+ ;; TODO: Once minimum Emacs version is 25.1 or above, consider using
|
|
|
+ ;; the `make-process' invocation from 5db61eb0f929 to get more helpful
|
|
|
+ ;; error messages.
|
|
|
+ (let ((process-connection-type nil))
|
|
|
+ (start-process-shell-command cmd nil cmd))
|
|
|
(and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))))
|
|
|
((or (stringp cmd)
|
|
|
(eq cmd 'emacs))
|