aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorEli Zaretskii2012-12-23 19:06:58 +0200
committerEli Zaretskii2012-12-23 19:06:58 +0200
commit299614f3bcac13be9a17d038f247856e384d9dbd (patch)
tree3a1121979e537c9eaf053573a8e92e9ccf95119a /src/ChangeLog
parent9c3dcdaafa79daaaeb26fb41ec0df1ead50c330b (diff)
downloademacs-299614f3bcac13be9a17d038f247856e384d9dbd.tar.gz
emacs-299614f3bcac13be9a17d038f247856e384d9dbd.zip
Improve handling of subprocess shutdown on MS-Windows.
src/w32proc.c (reader_thread): Do not index fd_info[] with negative values. (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR after WaitForSingleObject returns normally. This expedites reader thread shutdown when delete_child triggers it. (reap_subprocess): More accurate commentary for why we call delete_child only when cp->fd is negative. src/w32.c (sys_close): Do not call delete_child on a subprocess whose handle is not yet closed. Instead, set its file descriptor to a negative value, so that reap_subprocess will call delete_child on that subprocess when its SIGCHLD arrives. This avoids closing handles used for communications between sys_select and reader_thread, which doesn't give sys_select a chance to notice that the process exited and invoke the SIGCHLD handler for it.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2723d8f92ec..c7502104ddf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,22 @@
12012-12-23 Eli Zaretskii <eliz@gnu.org>
2
3 * w32proc.c (reader_thread): Do not index fd_info[] with negative
4 values.
5 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
6 after WaitForSingleObject returns normally. This expedites reader
7 thread shutdown when delete_child triggers it.
8 (reap_subprocess): More accurate commentary for why we call
9 delete_child only when cp->fd is negative.
10
11 * w32.c (sys_close): Do not call delete_child on a subprocess
12 whose handle is not yet closed. Instead, set its file descriptor
13 to a negative value, so that reap_subprocess will call
14 delete_child on that subprocess when its SIGCHLD arrives. This
15 avoids closing handles used for communications between sys_select
16 and reader_thread, which doesn't give sys_select a chance to
17 notice that the process exited and invoke the SIGCHLD handler for
18 it.
19
12012-12-23 Jan Djärv <jan.h.d@swipnet.se> 202012-12-23 Jan Djärv <jan.h.d@swipnet.se>
2 21
3 * nsfns.m (Fns_do_applescript): Run event loop until script has 22 * nsfns.m (Fns_do_applescript): Run event loop until script has