aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-12-29 21:30:59 +0200
committerEli Zaretskii2020-12-29 21:30:59 +0200
commitbaac3562a669ef4570cc258b5e6fc6472a6c9407 (patch)
tree019abdc1f967917a3c2ee119ec3e09ff8d057d9b /src
parent0326cddc7bb2a90924af200057b4e2ef263924c8 (diff)
downloademacs-baac3562a669ef4570cc258b5e6fc6472a6c9407.tar.gz
emacs-baac3562a669ef4570cc258b5e6fc6472a6c9407.zip
A better fix for process-tests on MS-Windows
* src/w32.c (pipe2): When forcibly closing pipe handles due to overflow of FD_SETSIZE, set the handles to -1, to avoid assertion violations in emacs_close. * test/src/process-tests.el (process-tests/fd-setsize-no-crash): No need to skip this test anymore.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index 5ebae324c20..56c78a0d229 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -8667,6 +8667,11 @@ pipe2 (int * phandles, int pipe2_flags)
8667 { 8667 {
8668 _close (phandles[0]); 8668 _close (phandles[0]);
8669 _close (phandles[1]); 8669 _close (phandles[1]);
8670 /* Since we close the handles, set them to -1, so as to
8671 avoid an assertion violation if the caller then tries to
8672 close the handle again (emacs_close will abort otherwise
8673 if errno is EBADF). */
8674 phandles[0] = phandles[1] = -1;
8670 errno = EMFILE; 8675 errno = EMFILE;
8671 rc = -1; 8676 rc = -1;
8672 } 8677 }