help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query about Emacs Process API | Asynchronous processes


From: Narendra Joshi
Subject: Re: Query about Emacs Process API | Asynchronous processes
Date: Sun, 05 Jul 2020 16:33:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Narendra Joshi <narendraj9@gmail.com>
>> Date: Sun, 05 Jul 2020 00:42:22 +0200
>> 
>> #+begin_src emacs-lisp
>> (make-process :name "a-pty-process" :command (list nil) :buffer 
>> "*a-pty-process-buffer*")
>> #+end_src
>> 
>> This creates a process with a pseudo terminal. This process is shown by
>> `list-processes`
>> 
>> #+begin_src 
>>  Process ▼ PID Status Buffer TTY Thread Command 
>> a-pty-process   -2      run     *a-pty-process-buffer*    /dev/pts/1   Main  
>>        
>> #+end_src
>> 
>> ^ The process ID is a negative number. It makes me think that there is
>> no real sub-process (OS level) yet. Is that true? If not, what is being
>> executed by the sub-process?
>
> From the ELisp manual:
>
>      :command COMMAND
>           Use COMMAND as the command line of the process.  The value
>           should be a list starting with the program’s executable file
>           name, followed by strings to give to the program as its
>           arguments.  If the first element of the list is ‘nil’, Emacs
>           opens a new pseudoterminal (pty) and associates its input and
>           output with BUFFER, without actually running any program; the
>           rest of the list elements are ignored in that case.
>
I read that section of the manual. I am still not sure what will be the
use cases for this. Where in Emacs (or the package ecosystem) is this
feature being used currently?

Best,
-- 
Narendra Joshi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]