From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Starting a subprocess in stopped state Date: Sat, 06 May 2017 07:42:18 +0200 Message-ID: <87bmr6wngl.fsf@zigzag> References: <831ss7hyh0.fsf@gnu.org> <83tw4zg3rj.fsf@gnu.org> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1494049029 15796 195.159.176.226 (6 May 2017 05:37:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 May 2017 05:37:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 06 07:37:06 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6sOv-000444-Lg for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 07:37:05 +0200 Original-Received: from localhost ([::1]:50101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6sP1-0000nh-3C for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 01:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6sOt-0000iM-0V for emacs-devel@gnu.org; Sat, 06 May 2017 01:37:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6sOp-0002w6-VO for emacs-devel@gnu.org; Sat, 06 May 2017 01:37:03 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:60331) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6sOp-0002us-Qx for emacs-devel@gnu.org; Sat, 06 May 2017 01:36:59 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1d6sOn-0003mM-Lh for emacs-devel@gnu.org; Sat, 06 May 2017 01:36:57 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1d6sUA-0006Mn-2H for emacs-devel@gnu.org; Sat, 06 May 2017 07:42:30 +0200 In-Reply-To: <83tw4zg3rj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2017 10:29:52 +0300") Mail-Followup-To: emacs-devel@gnu.org X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 67.59.132.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214601 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Eli Zaretskii () 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 =E2=80=98make-process=E2=80=99 says: :stop BOOL -- Start process in the =E2=80=98stopped=E2=80=99 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 =E2=80=98continue-process=E2=80=99 and set by =E2=80=98stop-process=E2=80=99. 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 =E2=80=98pselect=E2=80=99 fd list is a correct implementa= tion. If anyone can refute this refutation, please do -- i'm all ears (in a "stopped state", myself :-D)! =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) (pcase (context query) (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlkNYjwACgkQZwMiJEyAdQJxfwCg3khQMebS+HOyp7vET088GrOn jOcAoOJZlG22W0xAbhxWLV3WClNNeTS1 =GPfR -----END PGP SIGNATURE----- --=-=-=--