emacs-devel
[Top][All Lists]
Advanced

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

Re: Starting a subprocess in stopped state


From: Thien-Thi Nguyen
Subject: Re: Starting a subprocess in stopped state
Date: Sat, 06 May 2017 07:42:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

() Eli Zaretskii <address@hidden>
() Fri, 05 May 2017 10:29:52 +0300

   > What I see in the code is that when make-process is called
   > with the :stop attribute non-nil, the file descriptor to be
   > used for reading the process output is not added to the
   > list of descriptors watched by pselect.  But that doesn't
   > really suspend the process like SIGTSTP would, right?  And
   > I see no other code that specifically handles the :stop
   > attribute.  Am I missing something?

   confirm or refute

I see the docstring for ‘make-process’ says:

 :stop BOOL -- Start process in the ‘stopped’ state if BOOL
 non-nil.  In the stopped state, a process does not accept
 incoming data, but you can send outgoing data.  The stopped
 state is cleared by ‘continue-process’ and set by
 ‘stop-process’.

My understanding is that "stopped state", given that "you can
send outgoing data", is an Emacs-internal data routing concern
rather than an OS-level concern (SIGTSTP).  The latter would
completely prevent the asymmetric data feature (documented by
"you can send outgoing data"), i'd think.

So, omission from ‘pselect’ fd list is a correct implementation.
If anyone can refute this refutation, please do -- i'm all ears
(in a "stopped state", myself :-D)!

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502

Attachment: signature.asc
Description: PGP signature


reply via email to

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