aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPo Lu2024-07-29 20:59:29 +0800
committerPo Lu2024-07-29 20:59:29 +0800
commit9bf0331d02d60dc1184661645b226479525c3605 (patch)
treec0e1ce8d34657be5fc697cc81ba386339c173ee6 /src/process.c
parente4d22abcab60ead179e7d114faa4c2def559cfbb (diff)
parent5cf64d8377ad43f9a7b0ad28cbb4a494b403806b (diff)
downloademacs-9bf0331d02d60dc1184661645b226479525c3605.tar.gz
emacs-9bf0331d02d60dc1184661645b226479525c3605.zip
Merge from savannah/emacs-30
5cf64d8377a Fix sporadic crashes and `select' failures in dumped images a475360af98 Correct display of Doc View documents after tab switching
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/process.c b/src/process.c
index 93178eb241f..73600157835 100644
--- a/src/process.c
+++ b/src/process.c
@@ -275,9 +275,9 @@ static int read_process_output (Lisp_Object, int);
275static void create_pty (Lisp_Object); 275static void create_pty (Lisp_Object);
276static void exec_sentinel (Lisp_Object, Lisp_Object); 276static void exec_sentinel (Lisp_Object, Lisp_Object);
277 277
278static Lisp_Object 278static Lisp_Object network_lookup_address_info_1 (Lisp_Object, const char *,
279network_lookup_address_info_1 (Lisp_Object host, const char *service, 279 struct addrinfo *,
280 struct addrinfo *hints, struct addrinfo **res); 280 struct addrinfo **);
281 281
282/* Number of bits set in connect_wait_mask. */ 282/* Number of bits set in connect_wait_mask. */
283static int num_pending_connects; 283static int num_pending_connects;
@@ -5350,7 +5350,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5350 struct Lisp_Process *p; 5350 struct Lisp_Process *p;
5351 5351
5352 retry_for_async = false; 5352 retry_for_async = false;
5353 FOR_EACH_PROCESS(process_list_head, aproc) 5353 FOR_EACH_PROCESS (process_list_head, aproc)
5354 { 5354 {
5355 p = XPROCESS (aproc); 5355 p = XPROCESS (aproc);
5356 5356
@@ -5706,9 +5706,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5706 /* If wait_proc is somebody else, we have to wait in select 5706 /* If wait_proc is somebody else, we have to wait in select
5707 as usual. Otherwise, clobber the timeout. */ 5707 as usual. Otherwise, clobber the timeout. */
5708 if (tls_nfds > 0 5708 if (tls_nfds > 0
5709 && (!wait_proc || 5709 && (!wait_proc
5710 (wait_proc->infd >= 0 5710 || (wait_proc->infd >= 0
5711 && FD_ISSET (wait_proc->infd, &tls_available)))) 5711 && FD_ISSET (wait_proc->infd, &tls_available))))
5712 timeout = make_timespec (0, 0); 5712 timeout = make_timespec (0, 0);
5713#endif 5713#endif
5714 5714
@@ -5769,8 +5769,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5769 /* Slow path, merge one by one. Note: nfds does not need 5769 /* Slow path, merge one by one. Note: nfds does not need
5770 to be accurate, just positive is enough. */ 5770 to be accurate, just positive is enough. */
5771 for (channel = 0; channel < FD_SETSIZE; ++channel) 5771 for (channel = 0; channel < FD_SETSIZE; ++channel)
5772 if (FD_ISSET(channel, &tls_available)) 5772 if (FD_ISSET (channel, &tls_available))
5773 FD_SET(channel, &Available); 5773 FD_SET (channel, &Available);
5774 } 5774 }
5775#endif 5775#endif
5776 } 5776 }
@@ -8616,6 +8616,14 @@ init_process_emacs (int sockfd)
8616 8616
8617 inhibit_sentinels = 0; 8617 inhibit_sentinels = 0;
8618 8618
8619#ifdef HAVE_UNEXEC
8620 /* Clear child_signal_read_fd and child_signal_write_fd after dumping,
8621 lest wait_reading_process_output should select on nonexistent file
8622 descriptors which existed in the build process. */
8623 child_signal_read_fd = -1;
8624 child_signal_write_fd = -1;
8625#endif /* HAVE_UNEXEC */
8626
8619 if (!will_dump_with_unexec_p ()) 8627 if (!will_dump_with_unexec_p ())
8620 { 8628 {
8621#if defined HAVE_GLIB && !defined WINDOWSNT 8629#if defined HAVE_GLIB && !defined WINDOWSNT