unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: luangruo@yahoo.com, 63865@debbugs.gnu.org
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	[thread overview]
Message-ID: <83leh08xmn.fsf@gnu.org> (raw)
In-Reply-To: <ieredmsadzp.fsf@janestreet.com> (message from Spencer Baugh on Sat, 03 Jun 2023 09:10:02 -0400)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Cc: luangruo@yahoo.com,  63865@debbugs.gnu.org
> Date: Sat, 03 Jun 2023 09:10:02 -0400
> 
> Eli Zaretskii <eliz@gnu.org> 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.





  reply	other threads:[~2023-06-03 13:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-03  1:55 bug#63865: 29.0.90; call-process while owning the X selection hangs other processes Spencer Baugh
2023-06-03  6:02 ` Eli Zaretskii
2023-06-03  7:11   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03  9:12     ` Eli Zaretskii
2023-06-03  9:31       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 11:10     ` Spencer Baugh
2023-06-03 11:16       ` Eli Zaretskii
2023-06-03 12:07       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 12:30         ` Spencer Baugh
2023-06-03 12:55           ` Eli Zaretskii
2023-06-03 13:10             ` Spencer Baugh
2023-06-03 13:48               ` Eli Zaretskii [this message]
2023-06-03 14:12                 ` Spencer Baugh
2023-06-03 14:24                   ` Eli Zaretskii
2023-06-03 14:41                     ` Spencer Baugh
2023-06-03 15:02                       ` Eli Zaretskii
2023-06-03 15:34                         ` Spencer Baugh
2023-06-03 15:50                           ` Eli Zaretskii
2023-06-04  0:18                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 16:21               ` Andreas Schwab
2023-06-03 17:03                 ` Spencer Baugh
2023-06-03 17:07                   ` Eli Zaretskii
2023-06-04  0:15                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  0:13               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  0:12           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-23 14:26 ` Spencer Baugh

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=83leh08xmn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63865@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=sbaugh@janestreet.com \
    /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).