• Eli Zaretskii's avatar
    Port the 'module/async-pipe' test to MS-Windows · f98ee21c
    Eli Zaretskii authored
    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.
    f98ee21c
emacs-module-tests.el 17.1 KB