all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Narendra Joshi <narendraj9@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Query about Emacs Process API | Asynchronous processes
Date: Sun, 05 Jul 2020 16:33:49 +0200	[thread overview]
Message-ID: <87imf2xc8i.fsf@gmail.com> (raw)
In-Reply-To: <83h7umt4qa.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jul 2020 17:29:33 +0300")

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	other threads:[~2020-07-05 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 22:42 Query about Emacs Process API | Asynchronous processes Narendra Joshi
2020-07-05 14:29 ` Eli Zaretskii
2020-07-05 14:33   ` Narendra Joshi [this message]
2020-07-05 15:25     ` Stefan Monnier
2020-07-05 19:13       ` Narendra Joshi
2020-07-07 22:26         ` Narendra Joshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imf2xc8i.fsf@gmail.com \
    --to=narendraj9@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.