diff options
| author | Eli Zaretskii | 2020-12-29 21:30:59 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2020-12-29 21:30:59 +0200 |
| commit | baac3562a669ef4570cc258b5e6fc6472a6c9407 (patch) | |
| tree | 019abdc1f967917a3c2ee119ec3e09ff8d057d9b /src | |
| parent | 0326cddc7bb2a90924af200057b4e2ef263924c8 (diff) | |
| download | emacs-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -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 | } |