On 8/16/2025 12:21 PM, Eli Zaretskii wrote: >> Date: Sat, 16 Aug 2025 10:19:21 -0700 >> Cc: mail@daniel-mendler.de, eggert@cs.ucla.edu, 79079@debbugs.gnu.org >> From: Jim Porter >> >> It doesn't look like Emacs has the ability to close a file descriptor >> from Lisp. I could add a C function to do this from Lisp, but I don't >> know if it would be useful outside of this one test. > > There's nothing wrong in having a function for the benefit of running > tests. If suitably documented, it's okay, I think. Ok, now done. I've added a new function called 'internal-close-stream'. Hopefully the documentation is clear enough (it's a pretty simple function). >> The tests aren't especially useful on Windows, but they should pass >> (assuming the pipe test does), since on Windows we always use a pipe, >> even if the user requests a PTY. > > What would be the purpose of running the same tests several times? Just one fewer conditional in the tests, but that's not a big deal. I've change this to run only the "pipe" case under MS-Windows.