From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63865: 29.0.90; call-process while owning the X selection hangs other processes Date: Sat, 03 Jun 2023 16:48:48 +0300 Message-ID: <83leh08xmn.fsf@gnu.org> References: <83edmt9j8i.fsf@gnu.org> <87bkhxnhpk.fsf@yahoo.com> <87wn0kn3zu.fsf@yahoo.com> <83mt1g9044.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12017"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 63865@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 15:49:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q5RdJ-0002vQ-FS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 15:49:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Rcu-0007sj-K4; Sat, 03 Jun 2023 09:49:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Rcs-0007sQ-Uu for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5Rcs-0008Ky-Mx for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5Rcs-00036i-6Z for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63865 X-GNU-PR-Package: emacs Original-Received: via spool by 63865-submit@debbugs.gnu.org id=B63865.168580010011829 (code B ref 63865); Sat, 03 Jun 2023 13:49:02 +0000 Original-Received: (at 63865) by debbugs.gnu.org; 3 Jun 2023 13:48:20 +0000 Original-Received: from localhost ([127.0.0.1]:41902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5RcC-00034i-5L for submit@debbugs.gnu.org; Sat, 03 Jun 2023 09:48:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rc9-00033t-CD for 63865@debbugs.gnu.org; Sat, 03 Jun 2023 09:48:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Rc3-0008Cc-Re; Sat, 03 Jun 2023 09:48:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oqDm9P1bBewJnDEP+SUBOXsgNDTa+XsrG8L/f9YLGwU=; b=PaebKwlDWEb7 Q0eXBtQN/rYJGaziY/3JyvOCgsGvRwHz88LZkeBdwvR2BHoNL49sINMn+j8Vn1JNmif93eOS3lTeO 1rHYp8atmolEissq52ZDOdO2V+Rvb7M/MXs415UCuAf3r1kyPXRgSI/uEqGM5I5kqmBF9ZDsnHDFq pco88+L5XyhHUE8tzz34CsXSXEzy5dVuA9GSR8MxUU27nXEUZqOt0ViDy98C/AaFdmxrLEaIqzgHo gqY0E4RehG67rUXA8ja2mxWixPtHX9ttvUkEErXhPhal5vYoh8bSXDsfu2wrcRuX2vfiAMwRlNfUV k6J+CdStU/o53nKCBEUt+Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Rbp-0004bA-V9; Sat, 03 Jun 2023 09:48:11 -0400 In-Reply-To: (message from Spencer Baugh on Sat, 03 Jun 2023 09:10:02 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262839 Archived-At: > From: Spencer Baugh > Cc: luangruo@yahoo.com, 63865@debbugs.gnu.org > Date: Sat, 03 Jun 2023 09:10:02 -0400 > > Eli Zaretskii writes: > >> If I'm implementing some package and I decide to use call-process for > >> some long operation, then some user uses my package and it runs > >> call-process, and they get bored while waiting and switch away from > >> Emacs, they'll experience a hang in some other application. That hang > >> seems clearly undesirable! > > > > Then don't design the package such that call-process blocks Emacs for > > prolonged periods of time. Because this will annoy the users of Emacs > > even before it will be seen by other applications that request X > > selections. > > Forget other packages: Emacs itself uses call-process in tons of places > where it will run for prolonged periods of time! Really? "tons of places where it will run for prolonged periods of time"? what is "prolonged period of time" for this purpose? Aren't you a tad exaggerating? > Should we port all these instances away from using call-process to avoid > this behavior? There's no general answer to that, we should examine each case separately. > > call-process has its use cases, which are important, and we will not > > deprecate it. > > > > You can easily emulate call-process with start-process if you need to > > do so, so Emacs gives you both possibilities (and expects you to use > > whatever is right in each case). > > What use case does call-process have on Unix, which an emulation in > terms of start-process would not also satisfy? When the process returns quickly. call-process is significantly simpler to use than start-process+wait, so doing that when unnecessary is a complication we shouldn't take. Anyway, this kind of discussion doesn't belong in a bug report about X selections.