malte-v
malte-v
Possible replacements for SIGSTOP and SIGCONT: - SIGSTOP: `DebugActiveProcess()` (is actually for enabling a debugger to attach to the process, but also stops the process) - SIGCONT: `DebugActiveProcessStop()` (same thing...
Good news: WM_CLOSE, TerminateProcess and DebugActiveProcess work like a charm. I wrote a simple C++ console app for testing purposes: https://github.com/maltevoos/SignalFaker Bad news: GenerateConsoleCtrlEvent doesn't work at all. It even...
@sancarn So what exactly is the difference between WM_CLOSE and WM_QUIT and what makes one better? Btw, a short explanation of the signals I mentioned: - SIGKILL is like taskkill...
I think we should stick with WM_CLOSE because this is what taskkill uses (at least multiple stackoverflow posts say so). Also I can confirm that WM_QUIT does nothing when sending...
@sancarn That looks pretty promising indeed. Will try it out later today :) @rdp `OpenProcess` just returns a handle to the process object with the given access rights so that...
> Maybe we should just shell out to taskkill ... ? :/ @rdp `taskkill` uses the window message `WM_CLOSE` so that won't work for console processes. If I try to...
@rdp I agree. We can't accept losing our console window just for terminating another process. Additionally, GenerateConsoleCtrlEvent doesn't do the same as a real Ctrl-C user input. For example when...
@markrjr Catching signals on Windows works the same way as on UNIX, namely through `signal()`. Our main problem is sending signals to other processes. On UNIX we have `kill()` where...
@markrjr The Python devs only did the easy part, namely registering signal handlers for the signals supported by windows when the user calls `signal.signal()`. When it comes to **sending** signals...
@sancarn I tested it yesterday. It doesn't work. Edit: Maybe I missed the `AllocConsole()`. I'll try it again and if it works, we could see how low we can go...