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: call-process blocks the active thread Date: Fri, 8 Sep 2017 11:00:42 +0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0bd564625b730558a4c87f" X-Trace: blaine.gmane.org 1504839672 8808 195.159.176.226 (8 Sep 2017 03:01:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2017 03:01:12 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 08 05:00:55 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 1dq9XJ-0001SH-IM for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 05:00:53 +0200 Original-Received: from localhost ([::1]:43073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq9XQ-0004rH-Nf for ged-emacs-devel@m.gmane.org; Thu, 07 Sep 2017 23:01:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq9XG-0004qw-HU for emacs-devel@gnu.org; Thu, 07 Sep 2017 23:00:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dq9XC-0003A0-1O for emacs-devel@gnu.org; Thu, 07 Sep 2017 23:00:50 -0400 Original-Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:38366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dq9XB-00039G-Sx for emacs-devel@gnu.org; Thu, 07 Sep 2017 23:00:45 -0400 Original-Received: by mail-io0-x22b.google.com with SMTP id n69so1908018ioi.5 for ; Thu, 07 Sep 2017 20:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=qzA4muWXx8Wy1ZdQzXkLsM6/Gp/yzPRe09C3VNeFfNA=; b=HCBrQwBxHZE5xyIWnanhLxwqdH9ben5jVYBXk/FJHzGVGo3JdJaQTbNSj/rOJ40yEz FscUFnuEktEyW6f2jpR1hjsfJ7t3lNgn4ZSxnbT0LyKZMW6MFj8kQH5+kKKeF+1T6/F/ Gnn66+1sOuzlZ982KY8X8M1Y18HNmWgztKNAHkymElebwQT6InZvtDqfqChubtioKHAW OvOOnPR7wdiUp+eTXFb6n/kRHCSABY+mA56gv4HQDiw0aLMU4rWq9kGkT6hgbWiVey2t 2eipysUx9o4bcZw8ri4ThAwILWzRaidV9RFmBdvr8lwxSjz221k7F5jWPj9satjmep2o 8Aag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qzA4muWXx8Wy1ZdQzXkLsM6/Gp/yzPRe09C3VNeFfNA=; b=jzA4drFZdSDjCz6fMfjN9bXMFMclbLT5Ho+phv61g78w6fcu677Xr+u3Ii50HXvkQQ vKwuot9fZajY7HjWn/2ZCMaI5MBCeNoEMh1zgAKScxQDGrT4uxy2tdm4mm5xiwKT+iUA BzWuLFdBwJUcUYFm8A2smCraOV2HWcSoI8kypQ3xp+NHIo84eVjV+GyjB40ZdZAdDBDA +Il9KXYlrUYAepfScOx/9SJ29rQJdka/DRT/3igAeVeHccDMcwuatQ+eTNMS5u17CbeB KykdbXUlpUBAW49NM8pDr+L7g5+hUi78mGJYrV52jG6Jf7x6Pk+8whlEHCCzdJqPOlpL bFdw== X-Gm-Message-State: AHPjjUigrKNtUBFVo9dqMta8BqIBCpT7T/+DSKTz7fDIGzqrWq+TvF2Y oMFi3ZGTH0WwByiITUnd9bz7KPpTGgA3aCs= X-Google-Smtp-Source: AOwi7QBV9rWx2LOCG3oYjbK9vJ7KwdRRmYp865z8qGJfV8fpjnCloeH4CzV77FPrOjnRC1JS9yRNCcPB5c6CDk4VN/M= X-Received: by 10.107.202.133 with SMTP id a127mr1565796iog.22.1504839643321; Thu, 07 Sep 2017 20:00:43 -0700 (PDT) Original-Received: by 10.107.170.27 with HTTP; Thu, 7 Sep 2017 20:00:42 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22b 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:218000 Archived-At: --94eb2c0bd564625b730558a4c87f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was trying to use =E2=80=98call-process=E2=80=99 in a thread in order to = not have to deal with process buffers and the like while still being able to run an external program in the background. As it turns out, =E2=80=98call-process=E2=80=99 hangs all of Emacs while th= e external program is run. To reproduce, simply type M-: (make-thread (lambda () (call-process "sleep" nil nil nil "2"))) This will hang Emacs for 2 seconds. Regards, Elias --94eb2c0bd564625b730558a4c87f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I was trying to use =E2=80=98call-process=E2=80=99 in a th= read in order to not have to deal with process buffers and the like while s= till being able to run an external program in the background.

As it turns out, =E2=80=98call-process=E2=80=99 hangs all of Emacs wh= ile the external program is run.

To reproduce, sim= ply type M-: (make-thread (lambda () (call-process "sleep" nil ni= l nil "2")))

This will hang Emacs fo= r 2 seconds.

Regards,
Elias
--94eb2c0bd564625b730558a4c87f--