Eli Zaretskii writes: > Thanks. I think this needs an entry in NEWS. Done. > We don't put in Emacs sources compile-time conditionals that depend on > the version of the OS on which Emacs is built: that would preclude the > (very popular on Windows) practice of building Emacs on one system, > and then using it on many others, possibly running other versions of > the OS. Thanks for this explanation and sorry that I didn't thought about this. I changed it to use run-time dynamic linking. > When the function is not available, you should assign ENOTSUP to > errno, not EINVAL, to make the error message more accurate. Done. > Please test what this functionality does when PID specifies a child > process of Emacs (which is tracked via the child_procs[] array), and > also when it specifies the calling Emacs process itself. If any of > these use cases cause any kind of trouble, we may wish to disallow > such usage, to prevent users from shooting themselves in the foot. Sending SIGTRAP to a process -- whether it's an unrelated, child or the calling Emacs process itself -- does not seem to have any effect as long as no debugger is attached to the receiving process. At least this is what I observe on Windows 10. Shall I test on other OS versions as well? If so, I would have to install say an Win XP first as I do not have one available right now. Unfortunately, on MSDN the remark on DebugBreakProcess says it causes the receiving process to terminate in most cases, see https://msdn.microsoft.com/en-us/library/windows/desktop/ms679298(v=vs.85).aspx But with all processes I tried, none of them was ever terminated. Many thanks for your help. Alain