unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dick <dick.r.chiang@gmail.com>
Cc: 43834@debbugs.gnu.org
Subject: bug#43834: 27.1; [PATCH] Sentinels under X and command line
Date: Tue, 06 Oct 2020 21:57:49 +0300	[thread overview]
Message-ID: <83mu0z9o7m.fsf@gnu.org> (raw)
In-Reply-To: <87y2kjgqj5.fsf@dick> (message from dick on Tue, 06 Oct 2020 14:25:50 -0400)

> From: dick <dick.r.chiang@gmail.com>
> Date: Tue, 06 Oct 2020 14:25:50 -0400
> 
> emacs -Q -l cl-lib \
>   --eval "(let* (flag \
>                  (proc (apply (function start-process) \"test\" nil \"sleep\" (list \"3\")))) \
>             (set-process-sentinel proc (lambda (&rest _args) (setq flag t))) \
>             (cl-assert (cl-loop repeat 10 \
>                         until flag \
>                         do (accept-process-output nil 0.5) \
>                         finally return flag)) \
>             (message \"good!\"))"
> 
> >From cd25ae2e9f8cf1d155084c125dae4058fccb6544 Mon Sep 17 00:00:00 2001
> From: dickmao <none>
> Date: Tue, 6 Oct 2020 14:21:03 -0400
> Subject: [PATCH] Process sentinels need to work under X and commandline
> 
> This is also noted in
> https://emacs.stackexchange.com/questions/60408/\
> process-sentinels-dont-run-during-init-in-gui-emacs
> 
> * src/process.c (add_non_keyboard_read_fd): Make this a public function.
> (add_process_read_fd): Fold old, static add_non_keyboard_read_fd guts
> into here.
> * src/xsmfns.c (ice_conn_watch_CB): Call add_non_keyboard_read_fd.

I'm probably missing something, because I don't understand the
rationale for your changes.  Can you please elaborate on the
rationale?  Also, are your changes supposed to fix the problem
reported at stackexchange, and if so, please also elaborate on that.

Thanks.

P.S. I'd prefer not to change the add_*_fd unless strictly necessary.
It's okay to make a static function be extern, but can we please avoid
other reshuffling?  If necessary (but I'd like to understand why), I'd
even prefer introducing a new function, rather than changing the
existing ones.  Specifically, I'd like to avoid the change of the
semantics of add_non_keyboard_read_fd.





  reply	other threads:[~2020-10-06 18:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 18:25 bug#43834: 27.1; [PATCH] Sentinels under X and command line dick
2020-10-06 18:57 ` Eli Zaretskii [this message]
2020-10-06 19:16   ` dick.r.chiang
2020-10-07  6:39     ` Eli Zaretskii
2020-10-07 11:32       ` dick.r.chiang
2020-10-07 12:18         ` Eli Zaretskii
2020-10-07 12:33           ` dick.r.chiang
2020-10-07 13:19             ` Eli Zaretskii
2020-10-07 13:44               ` dick.r.chiang
2020-10-07 14:17                 ` Eli Zaretskii
2021-05-13 10:52                   ` Lars Ingebrigtsen
2021-05-13 12:22                     ` Eli Zaretskii
2021-05-13 13:22                       ` Lars Ingebrigtsen

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=83mu0z9o7m.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=43834@debbugs.gnu.org \
    --cc=dick.r.chiang@gmail.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).