diff options
| author | Eli Zaretskii | 2012-12-23 19:06:58 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-12-23 19:06:58 +0200 |
| commit | 299614f3bcac13be9a17d038f247856e384d9dbd (patch) | |
| tree | 3a1121979e537c9eaf053573a8e92e9ccf95119a /src/coding.c | |
| parent | 9c3dcdaafa79daaaeb26fb41ec0df1ead50c330b (diff) | |
| download | emacs-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/coding.c')
0 files changed, 0 insertions, 0 deletions