]> git.eshelyaron.com Git - emacs.git/commit
Port the 'module/async-pipe' test to MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Fri, 27 Mar 2020 12:43:20 +0000 (15:43 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 27 Mar 2020 13:19:20 +0000 (16:19 +0300)
commitf98ee21c0e3d4e00569fdd9f2671fd8394ab8a65
tree2fbc74b9c43d67ecd1c6fcb5f46841578248d3b5
parente4f8098b9e6e1a0b310cb64f73d39d2b0d3d9f2f
Port the 'module/async-pipe' test to MS-Windows

These changes let the code compile and produce a valid DLL, but the
test hangs.  It looks like the hang is in Fdelete_process, when it
closes one of the descriptors of the pipe process.
In addition, this use of the pipe process cannot currently work
on MS-Windows, since make-pipe-process doesn't set up the reader
thread to read from the Emacs's side of the pipe, so the select
emulation doesn't know there's stuff to read from that pipe.
* test/data/emacs-module/mod-test.c [WINDOWSNT]: Include
windows.h.
(ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds.
(sleep_for_half_second): New function.
(write_to_pipe): Declare return type differently for WINDOWSNT.
Call sleep_for_half_second.
(Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute
for pthread_create.
(invalid_finalizer): Replace non_ASCII character in a comment.

* test/src/emacs-module-tests.el (module/async-pipe): Skip on
MS-Windows, as the test fails and then hangs.
test/data/emacs-module/mod-test.c
test/src/emacs-module-tests.el