%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/eshell/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/eshell/esh-proc.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\210\312\313\314\315\316DD\317\320\321\322\323\310\303&	\210\312\324\314\315\325DD\326\322\327\310\303&\210\312\330\314\315\331DD\332\322\327\310\303&\210\312\333\314\315\334DD\335\322\336\310\303&\210\312\337\314\315\340DD\341\322\336\310\303&\210\312\342\314\315\343DD\344\322\345\310\303&\210\312\346\314\315\347DD\350\322\323\310\303&\210\312\351\314\315\352DD\353\320\321\322\323\310\303&	\207" [require esh-io custom-declare-group eshell-proc nil "When Eshell invokes external commands, it always does so\nasynchronously, so that Emacs isn't tied up waiting for the process to\nfinish." :tag "Process management" :group eshell custom-declare-variable eshell-proc-load-hook funcall function #[0 "\300\207" [nil] 1] "A hook that gets run when `eshell-proc' is loaded." :version "24.1" :type hook eshell-process-wait-seconds #[0 "\300\207" [0] 1] "The number of seconds to delay waiting for a synchronous process." integer eshell-process-wait-milliseconds #[0 "\300\207" [50] 1] "The number of milliseconds to delay waiting for a synchronous process." eshell-done-messages-in-minibuffer #[0 "\300\207" [t] 1] "If non-nil, subjob \"Done\" messages will display in minibuffer." boolean eshell-delete-exited-processes #[0 "\300\207" [t] 1] "If nil, process entries will stick around until `jobs' is run.\nThis variable sets the buffer-local value of `delete-exited-processes'\nin Eshell buffers.\n\nThis variable causes Eshell to mimic the behavior of bash when set to\nnil.  It allows the user to view the exit status of a completed subjob\n(process) at their leisure, because the process entry remains in\nmemory until the user examines it using \\[list-processes].\n\nOtherwise, if `eshell-done-messages-in-minibuffer' is nil, and this\nvariable is set to t, the only indication the user will have that a\nsubjob is done is that it will no longer appear in the\n\\[list-processes\\] display.\n\nNote that Eshell will have to be restarted for a change in this\nvariable's value to take effect." eshell-reset-signals #[0 "\300\207" [#1="^\\(interrupt\\|killed\\|quit\\|stopped\\)"] 1 #1#] "If a termination signal matches this regexp, the terminal will be reset." regexp eshell-exec-hook #[0 "\300\207" [nil] 1] "Called each time a process is exec'd by `eshell-gather-process-output'.\nIt is passed one argument, which is the process that was just started.\nIt is useful for things that must be done each time a process is\nexecuted in an eshell mode buffer (e.g., `set-process-query-on-exit-flag').\nIn contrast, `eshell-mode-hook' is only executed once, when the buffer\nis created." eshell-kill-hook #[0 "\300\207" [nil] 1] "Called when a process run by `eshell-gather-process-output' has ended.\nIt is passed two arguments: the process that was just ended, and the\ntermination status (as a string).  Note that the first argument may be\nnil, in which case the user attempted to send a signal, but there was\nno relevant process.  This can be used for displaying help\ninformation, for example."] 10)
(defvar eshell-current-subjob-p nil)
#@47 A list of the current status of subprocesses.
(defvar eshell-process-list nil (#$ . 3516))
#@173 Function run when killing a process.
Runs `eshell-reset-after-proc' and `eshell-kill-hook', passing arguments
PROC and STATUS to functions on the latter.

(fn PROC STATUS)
(defalias 'eshell-kill-process-function #[514 "\301>\203\302\301\"\301!\210\303\300#\207" [eshell-kill-hook eshell-reset-after-proc delq run-hook-with-args] 6 (#$ . 3614)])
#@39 Initialize the process handling code.
(defalias 'eshell-proc-initialize #[0 "\301\302!\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\207" [eshell-command-map make-local-variable eshell-process-list define-key [(meta 105)] eshell-insert-process [(control 99)] eshell-interrupt-process [(control 107)] eshell-kill-process [(control 100)] eshell-send-eof-to-process [(control 115)] list-processes [(control 92)] eshell-quit-process] 4 (#$ . 3973)])
#@158 Reset the command input location after a process terminates.
The signals which will cause this to happen are matched by
`eshell-reset-signals'.

(fn STATUS)
(defalias 'eshell-reset-after-proc #[257 "\211;\205\301\"\205\302\303!\210\304 \207" [eshell-reset-signals string-match require esh-mode eshell-reset] 4 (#$ . 4488)])
#@63 Wait until PROC has successfully completed.

(fn &rest PROCS)
(defalias 'eshell-wait-for-process #[128 "\211\2053\211@\211\303\304!\205\304!\262\203+\211\236\203+\305 \203#\306 \210\307	\n\"\210\202\210\211A\262\202\207" [eshell-process-list eshell-process-wait-seconds eshell-process-wait-milliseconds fboundp processp input-pending-p discard-input sit-for] 5 (#$ . 4824)])
(defalias 'eshell/wait 'eshell-wait-for-process)
#@52 List processes, if there are any.

(fn &rest ARGS)
(defalias 'eshell/jobs #[128 "\300\301!\205
\301 \205
\302 \207" [fboundp process-list list-processes] 3 (#$ . 5268)])
#@157 Kill processes.
Usage: kill [-<signal>] <pid>|<process> ...
Accepts PIDs and process objects.  Optionally accept signals
and signal names.

(fn &rest ARGS)
(defalias 'eshell/kill #[128 "\301@\302\211;\203.\303\304\"\203\305\306!!\262\202*\303\307\"\203*\310\311\312\"!\262A\262)\210\203\215@\313\314!\205?\314!\262\203K\315@!\202O\306@!\211\203\205\211\204^\316\317!\210\202\205\211\247\204m\316\320\321!\"\210\202\205\211\247\203\200\211\322X\203\200\316\323\"\210\202\205\324\"\210\210A\262\2020\210\302\207" [case-fold-search SIGINT nil string-match "\\`-[[:digit:]]+\\'" abs string-to-number "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" intern substring 1 fboundp processp process-id error "kill: null pid.  Process may actually be a network connection." "kill: invalid argument type: %s" type-of 0 "kill: bad pid: %d" signal-process] 7 (#$ . 5447)])
(put 'eshell/kill 'eshell-no-numeric-conversions t)
#@114 Read the name of a process from the minibuffer, using completion.
The prompt will be set to PROMPT.

(fn PROMPT)
(defalias 'eshell-read-process-name #[257 "\300\301\302\303 \"\304\305$\207" [completing-read mapcar #[257 "\300!\301B\207" [process-name t] 3 "\n\n(fn PROC)"] process-list nil t] 6 (#$ . 6399)])
#@76 Insert the name of PROCESS into the current buffer at point.

(fn PROCESS)
(defalias 'eshell-insert-process #[257 "\300\301\302!\303#\207" [insert-and-inherit "#<process " process-name ">"] 5 (#$ . 6716) (byte-code "\300\301\302!!C\207" [get-process eshell-read-process-name "Name of process: "] 3)])
#@44 Record OBJECT as now running.

(fn OBJECT)
(defalias 'eshell-record-process-object #[257 "\211\303\304!\205\n\304!\262\203#\203#\305\306!\210\307\310\311\312!\313!#!\210\211	\314\211\257\nB\211\207" [eshell-current-subjob-p eshell-current-handles eshell-process-list fboundp processp require esh-mode eshell-interactive-print format "[%s] %d\n" process-name process-id nil] 7 (#$ . 7024)])
(put 'eshell-record-process-object 'byte-optimizer 'byte-compile-inline-expand)
#@58 Record the process ENTRY as fully completed.

(fn ENTRY)
(defalias 'eshell-remove-process-entry #[257 "\211@\302\303!\205\303!\262\203&\3048\203&\203&\305\306\307@!\310@!#\210\311	\"\211\207" [eshell-done-messages-in-minibuffer eshell-process-list fboundp processp 2 message "[%s]+ Done %s" process-name process-command delq] 6 (#$ . 7511)])
#@51 Scratch buffer for holding Eshell's input/output.
(defvar eshell-scratch-buffer " *eshell-scratch*" (#$ . 7872))
#@132 A marker that tracks the beginning of output of the last subprocess.
Used only on systems which do not support async subprocesses.
(defvar eshell-last-sync-output-start nil (#$ . 7992))
#@272 List of commands which need `process-connection-type' to be nil.
Currently only affects commands in pipelines, and not those at
the front.  If an element contains a directory part it must match
the full name of a command, otherwise just the nondirectory part must match.
(defvar eshell-needs-pipe '("bc" "pbpaste" "putclip" "xclip" "xsel" "wl-copy") (#$ . 8185))
#@109 Return non-nil if COMMAND needs `process-connection-type' to be nil.
See `eshell-needs-pipe'.

(fn COMMAND)
(defalias 'eshell-needs-pipe-p #[257 "\302\300!\205>\205>\303=?\205>\3042>	\211\205;\211@\211\305\306\"\203(\202+\307!\230\2034\310\304\311\"\210A\266\202\202\2620\207" [eshell-in-pipeline-p eshell-needs-pipe boundp first found string-match "/" file-name-nondirectory throw t] 7 (#$ . 8555)])
#@59 Gather the output from COMMAND + ARGS.

(fn COMMAND ARGS)
(defalias 'eshell-gather-process-output #[514 "\306\307!\210\310!\203\311\312!!\204\313\314\"\210\203	\202 \n\315 \316\211\211\211\317\320!\203\337\321!?\2057\f\322\323!!\324\320\325!\316%)\266\202\262\211\317\326!\205Y\326!\262\203r\203r\306\327!\210\330\331\332\333!\334!#!\210\211
\316\211\257?B\211?\266\335p\"\210\336\337 \203\221\340\202\222\341\"\210\342\343\"\210\344\345\"\210\317\346!\203\245\346!\211@\262\211A\262\210\347\350!!\203\301\351\352\"\262\353\262\203\322\204\322\351\354\"\262\353\262\211\203\245\355#\210\202\245p\337 \316\211\211\211\211\356@!\204\362\357 @\360A!q\262\361 \210q\210\344\345\"\210\324\362\363@`\353A\316\257\"\"\262\364\365!\203+5\203+@`\316\223\210\211\247\203jq\210eb\210`\262\366y\367=\203f`\262\370\"\262q\210\203Y\340\316\"\210\202]\371!\210\262q\210\2029q\210\306\327!\210\372B!\210\373\247\203}\202~\374!\210\375
\"\210\364\365!\203\2215\204\224\316@\211\247\204\240\313\376#\210\353\262\266*\207" [eshell-current-subjob-p eshell-delete-exited-processes delete-exited-processes process-environment process-connection-type eshell-current-handles require esh-var file-executable-p file-regular-p file-truename error "%s: not an executable file" eshell-environment-variables nil fboundp start-file-process eshell-needs-pipe-p file-local-name expand-file-name apply file-name-nondirectory processp esh-mode eshell-interactive-print format "[%s] %d\n" process-name process-id set-process-buffer set-process-filter eshell-interactive-output-p eshell-output-filter eshell-insertion-filter set-process-sentinel eshell-sentinel run-hook-with-args eshell-exec-hook process-coding-system vectorp coding-system-eol-type coding-system-change-eol-conversion dos t unix set-process-coding-system markerp point-marker get-buffer-create erase-buffer call-process-region append boundp eshell-in-pipeline-p 1 0 buffer-substring-no-properties eshell-output-object eshell-update-markers eshell-close-handles -1 eshell-kill-process-function "%s: external command failed: %s" eshell-process-list eshell-last-sync-output-start eshell-scratch-buffer eshell-last-output-end] 22 (#$ . 8979)])
#@162 Insert a string into the eshell buffer, or a process/file/buffer.
PROC is the process for which we're inserting output.  STRING is the
output.

(fn PROC STRING)
(defalias 'eshell-insertion-filter #[514 "\301\302!!\205Pr\302!q\210\236\211\205M\303\233\3038P\240\210\3048?\205M\3038\205M\3038\303\233\305\240\210\304\233\306\240\210\307\305A@#\210\304\233\305\240\266\202&\262)\207" [eshell-process-list buffer-live-p process-buffer 3 4 nil t eshell-output-object] 8 (#$ . 11285)])
#@147 Generic sentinel for command processes.  Reports only signals.
PROC is the process that's exiting.  STRING is the exit message.

(fn PROC STRING)
(defalias 'eshell-sentinel #[514 "\301\302!!\205xr\302!q\210\303\304\305\306\307\"\310\"\311$\216\236\211\205u\303\304\312\306\307!\313\"\314$\216\315\230?\205t\316\317\"\204C\320\"\210\211A@\3118\311\233\211\321\240\266\322!\321C\211\303\304\323\306\307\n\n\n\n\n%\324\"\325$\240\210\211\242 \262\266\203)\262*\207" [eshell-process-list buffer-live-p process-buffer make-byte-code 0 "\302\300\301\"\207" vconcat vector [eshell-kill-process-function] 3 "\301\300!\207" [eshell-remove-process-entry] 2 "run" string-match "^\\(finished\\|exited\\)" eshell-insertion-filter nil process-exit-status "\305\3008\203
\306\307\310\304\242#\207\302\203\311\302\310\301#\210\312\303\310\301#\207" [4 run-at-time 0 nil eshell-output-object eshell-close-handles] 4] 18 (#$ . 11794)])
#@239 Interact with a process, using PROMPT if more than one, via FUNC.
If ALL is non-nil, background processes will be interacted with as well.
If QUERY is non-nil, query the user with QUERY before calling FUNC.

(fn FUNC &optional ALL QUERY)
(defalias 'eshell-process-interact #[769 "\301\211\211\203I\211@\302@!\303>\2034\204\3048\2044\203-\305\306\307@!\"!\2034@!\262\302@!\310>\204B\211B\262A\266\202\202\210\211\203\\\211@\311!\210A\266\202\202K\210\207" [eshell-process-list nil process-status (run stop open closed) 2 y-or-n-p format-message process-name (run stop open closed) eshell-remove-process-entry] 12 (#$ . 12750)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\311&\210\300\316\302\303\317DD\320\306\321\310\311&\207" [custom-declare-variable eshell-kill-process-wait-time funcall function #[0 "\300\207" [5] 1] "Seconds to wait between sending termination signals to a subprocess." :type integer :group eshell-proc eshell-kill-process-signals #[0 "\300\207" [(SIGINT SIGQUIT SIGKILL)] 1] "Signals used to kill processes when an Eshell buffer exits.\nEshell calls each of these signals in order when an Eshell buffer is\nkilled; if the process is still alive afterwards, Eshell waits a\nnumber of seconds defined by `eshell-kill-process-wait-time', and\ntries the next signal in the list." (repeat symbol) eshell-kill-processes-on-exit #[0 "\300\207" [nil] 1] "If non-nil, kill active processes when exiting an Eshell buffer.\nEmacs will only kill processes owned by that Eshell buffer.\n\nIf nil, ownership of background and foreground processes reverts to\nEmacs itself, and will die only if the user exits Emacs, calls\n`kill-process', or terminates the processes externally.\n\nIf `ask', Emacs prompts the user before killing any processes.\n\nIf `every', it prompts once for every process.\n\nIf t, it kills all buffer-owned processes without asking.\n\nProcesses are first sent SIGHUP, then SIGINT, then SIGQUIT, then\nSIGKILL.  The variable `eshell-kill-process-wait-time' specifies how\nlong to delay between signals." (choice (const :tag "Kill all, don't ask" t) (const :tag "Ask before killing" ask) (const :tag "Ask for each process" every) (const :tag "Don't kill subprocesses" nil))] 8)
#@133 Kill current process by trying various signals in sequence.
See the variable `eshell-kill-processes-on-exit'.

(fn &optional QUERY)
(defalias 'eshell-round-robin-kill #[256 "C\211\242\2054\303\304\305\306\307\310!\311\"\312\313%\314#\210\315\262	\204'\211\315\240\210\202\316\n!\210\211\242A\240\210\202\207" [eshell-kill-process-signals eshell-process-list eshell-kill-process-wait-time eshell-process-interact make-byte-code 257 "\301\302!\300\242@\"\207" vconcat vector [signal-process process-id] 4 "\n\n(fn PROC)" t nil sleep-for] 9 (#$ . 15055)])
#@75 Kill processes belonging to the current Eshell buffer, possibly w/ query.
(defalias 'eshell-query-kill-processes #[0 "\205K	\205K\302 \303\304\305\306\307!\310\"\311$\216\312 \210\313=\203)\314\315\316\317 \"!\2033\320\321=\2051\322!\210\323\324!\211\203D\325!\203D\326!\210\210\327\330!)\262\207" [eshell-kill-processes-on-exit eshell-process-list current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 list-processes ask y-or-n-p format-message "Kill processes owned by `%s'? " buffer-name eshell-round-robin-kill every "Kill Eshell child process `%s'? " get-buffer "*Process List*" buffer-live-p kill-buffer message nil] 7 (#$ . 15627)])
#@22 Interrupt a process.
(defalias 'eshell-interrupt-process #[0 "\300\301!?\205\302\303\304\"\207" [eshell-process-interact interrupt-process eshell-kill-process-function nil "interrupt"] 3 (#$ . 16339) nil])
#@17 Kill a process.
(defalias 'eshell-kill-process #[0 "\300\301!?\205\302\303\304\"\207" [eshell-process-interact kill-process eshell-kill-process-function nil "killed"] 3 (#$ . 16553) nil])
#@30 Send quit signal to process.
(defalias 'eshell-quit-process #[0 "\300\301!?\205\302\303\304\"\207" [eshell-process-interact quit-process eshell-kill-process-function nil "quit"] 3 (#$ . 16749) nil])
#@22 Send EOF to process.
(defalias 'eshell-send-eof-to-process #[0 "\300\301!\210\302\303\211\304#\210\305\306!\207" [require esh-mode eshell-send-input nil t eshell-process-interact process-send-eof] 4 (#$ . 16956) nil])
(provide 'esh-proc)

Zerion Mini Shell 1.0