1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Merge from savannah/emacs-30

5cf64d8377 Fix sporadic crashes and `select' failures in dumped images
a475360af9 Correct display of Doc View documents after tab switching
This commit is contained in:
Po Lu 2024-07-29 20:59:29 +08:00
commit 9bf0331d02
2 changed files with 26 additions and 9 deletions

View File

@ -432,6 +432,15 @@ of the page moves to the previous page."
(defun doc-view-new-window-function (winprops)
;; (message "New window %s for buf %s" (car winprops) (current-buffer))
;;
;; If the window configuration changed, `image-mode-reapply-winprops'
;; will have erased any previous property list for this window, but
;; without removing existing overlays for the same, so that they must
;; be located and erased before a new overlay is created.
(dolist (tem (car (overlay-lists)))
(when (and (eq (overlay-get tem 'window) (car winprops))
(overlay-get tem 'doc-view))
(delete-overlay tem)))
(cl-assert (or (eq t (car winprops))
(eq (window-buffer (car winprops)) (current-buffer))))
(let ((ol (image-mode-window-get 'overlay winprops)))

View File

@ -275,9 +275,9 @@ static int read_process_output (Lisp_Object, int);
static void create_pty (Lisp_Object);
static void exec_sentinel (Lisp_Object, Lisp_Object);
static Lisp_Object
network_lookup_address_info_1 (Lisp_Object host, const char *service,
struct addrinfo *hints, struct addrinfo **res);
static Lisp_Object network_lookup_address_info_1 (Lisp_Object, const char *,
struct addrinfo *,
struct addrinfo **);
/* Number of bits set in connect_wait_mask. */
static int num_pending_connects;
@ -5350,7 +5350,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
struct Lisp_Process *p;
retry_for_async = false;
FOR_EACH_PROCESS(process_list_head, aproc)
FOR_EACH_PROCESS (process_list_head, aproc)
{
p = XPROCESS (aproc);
@ -5706,9 +5706,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
/* If wait_proc is somebody else, we have to wait in select
as usual. Otherwise, clobber the timeout. */
if (tls_nfds > 0
&& (!wait_proc ||
(wait_proc->infd >= 0
&& FD_ISSET (wait_proc->infd, &tls_available))))
&& (!wait_proc
|| (wait_proc->infd >= 0
&& FD_ISSET (wait_proc->infd, &tls_available))))
timeout = make_timespec (0, 0);
#endif
@ -5769,8 +5769,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
/* Slow path, merge one by one. Note: nfds does not need
to be accurate, just positive is enough. */
for (channel = 0; channel < FD_SETSIZE; ++channel)
if (FD_ISSET(channel, &tls_available))
FD_SET(channel, &Available);
if (FD_ISSET (channel, &tls_available))
FD_SET (channel, &Available);
}
#endif
}
@ -8616,6 +8616,14 @@ init_process_emacs (int sockfd)
inhibit_sentinels = 0;
#ifdef HAVE_UNEXEC
/* Clear child_signal_read_fd and child_signal_write_fd after dumping,
lest wait_reading_process_output should select on nonexistent file
descriptors which existed in the build process. */
child_signal_read_fd = -1;
child_signal_write_fd = -1;
#endif /* HAVE_UNEXEC */
if (!will_dump_with_unexec_p ())
{
#if defined HAVE_GLIB && !defined WINDOWSNT