From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: call-process blocks the active thread Date: Fri, 8 Sep 2017 18:36:17 +0800 Message-ID: References: <837ex9znba.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0892c8ad4b510558ab257c" X-Trace: blaine.gmane.org 1504868398 20158 195.159.176.226 (8 Sep 2017 10:59:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2017 10:59:58 +0000 (UTC) Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 08 12:59:41 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 1dqH0Y-0004Ll-7A for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 12:59:34 +0200 Original-Received: from localhost ([::1]:44563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqH0f-0006CN-4l for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 06:59:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqGeK-0002O4-Ni for emacs-devel@gnu.org; Fri, 08 Sep 2017 06:36:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqGeA-0003Ry-HH for emacs-devel@gnu.org; Fri, 08 Sep 2017 06:36:36 -0400 Original-Received: from mail-it0-x229.google.com ([2607:f8b0:4001:c0b::229]:46761) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dqGe3-0003Hf-AN; Fri, 08 Sep 2017 06:36:19 -0400 Original-Received: by mail-it0-x229.google.com with SMTP id 6so764572itl.1; Fri, 08 Sep 2017 03:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EZWu6nuXO2VafOQUAWx4xBQJ/j2PaaPGPSGTXrDq3IU=; b=EgOz86sUzRSK56iv32KleSqneRaAdmoi+Ol77rDbwCOD6H/zG6dPT3Q2CuIMTq9xdo KeidEDSIoyqiiH0i8wu7xhMCxN19I+RGqLVclEQDENd+exgXMdoJ3iXHZrudkL6QF3SH tryx0n314n2Kwf/dmdlz3+CUFmVtH9wqM23/mWJC+cxaLoC/KGpKyAuW5SnGGTFThUNa wWPJvyhvUWvSHJQnuPXiJUM+3QsLRhXMc6yvCXIWJsw7+CRW1jZlCVioSC1dy/8aW4w2 14SRaWjhIDjaCgxUuRRtPRA5DSGvzg4oshSws2meeP9oHFz7zWsPLuRMoiXAKZ8VPYMa TizQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EZWu6nuXO2VafOQUAWx4xBQJ/j2PaaPGPSGTXrDq3IU=; b=sTHzjBWfJ4RlhR8gwjFXnUcC3pUe+5kGvDSFkVkeuWUvKmeRFhsCT8Ndlvh+UbmJUU ssjD7T3xpM9rftk0qaf9aURtEJqx/foXGMvf875BOzqqG+96QEjr2aB6n87chq4oQ+4o SuFMiB1KS5LPWqRIc3jDEFyRbz+BEHGSC0Wt43B1tkxqjdxEhRI/odhHQcor3A5HS07t 4iKorKQyC1u+wIYT6U+4R6QCx9a+2WAEcctv06Ee8q+1dMSzwZAk++3OBmKT3b2bjgdO sfWjjMQ6uUdA+GMZwQhGhv7YqY95UPjrhtrctMJodXgS9609cmACYi4lhEbdQi7ZhMPK 3y7g== X-Gm-Message-State: AHPjjUivpWnn4uUKaqZ6gh8cECWLpmcy9/Zti7SQVXRiIQJ6SWnK3aCc OPoyko+CKHRQHaDyl9fiKHp3liJtpG/2 X-Google-Smtp-Source: ADKCNb4x9xtLxsiuEFdp23fhFYYBL9zp9RMYEQqEMFarVCUI+fa/u6R3r3bwkv7TccmORL+HRAoNIdYtq2gwLNjO38s= X-Received: by 10.36.134.194 with SMTP id u185mr276024itd.127.1504866978317; Fri, 08 Sep 2017 03:36:18 -0700 (PDT) Original-Received: by 10.107.170.27 with HTTP; Fri, 8 Sep 2017 03:36:17 -0700 (PDT) In-Reply-To: <837ex9znba.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::229 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:218013 Archived-At: --94eb2c0892c8ad4b510558ab257c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 8 September 2017 at 15:01, Eli Zaretskii wrote: > > From: Elias M=C3=A5rtenson > > Date: Fri, 8 Sep 2017 11:00:42 +0800 > > > > As it turns out, =E2=80=98call-process=E2=80=99 hangs all of Emacs whil= e the external > program is run. > > No, it hangs the calling thread, and the other threads wait for the > calling thread to yield. To avoid that, use start-process instead. > > This is not a bug. > I'm not entirely sure why you feel that distinction is important. At the end of the day, it's =E2=80=98start-process=E2=80=99 that doesn't yield whi= le the external process runs. Is there a reason why it can't be changed so that it does? Regards, Elias --94eb2c0892c8ad4b510558ab257c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On 8= September 2017 at 15:01, Eli Zaretskii <eliz@gnu.org> wrote:
=
> From: Elias M=C3=A5rtenson <lokedhs@gmail.com>
> Date: Fri, 8 Sep 2017 11:00:42 +0800
>
> As it turns out, =E2=80=98call-process=E2=80=99 hangs all of Emacs whi= le the external program is run.

No, it hangs the calling thread, and the other threads wait for the<= br> calling thread to yield.=C2=A0 To avoid that, use start-process instead.
This is not a bug.

I'm not entirel= y sure why you feel that distinction is important. At the end of the day, i= t's =E2=80=98start-process=E2=80=99 that doesn't yield while the ex= ternal process runs. Is there a reason why it can't be changed so that = it does?

Regards,
Elias
--94eb2c0892c8ad4b510558ab257c--