unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Starting a subprocess in stopped state
Date: Sat, 06 May 2017 07:42:18 +0200	[thread overview]
Message-ID: <87bmr6wngl.fsf@zigzag> (raw)
In-Reply-To: <83tw4zg3rj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2017 10:29:52 +0300")

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]


() Eli Zaretskii <eliz@gnu.org>
() 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2017-05-06  5:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 19:04 Starting a subprocess in stopped state Eli Zaretskii
2017-05-05  7:29 ` Eli Zaretskii
2017-05-06  5:42   ` Thien-Thi Nguyen [this message]
2017-05-06  7:58     ` Eli Zaretskii
2017-05-07 12:24       ` Philipp Stephani
2017-05-07 17:16         ` Eli Zaretskii
2017-05-07 17:25       ` Paul Eggert
2017-05-07 17:57         ` Eli Zaretskii
2017-05-07 18:05         ` Andreas Schwab
2017-05-08 16:41       ` Davis Herring
2017-05-08 16:46         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87bmr6wngl.fsf@zigzag \
    --to=ttn@gnu.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).