Sending SIGUSR1 IPC in Windows

Question:

I have the following NodeJS code:

In Unix I should be able to use kill -s SIGUSR1 1234 to send this signal. Windows doesn’t have a kill command, I can see that Powershell does but it doesn’t seem to have a -s like option.

So, how to I send a SIGUSR1 signal in Windows?

Answer:

As was already mentioned Windows does not support UNIX signals.

But, SIGUSR1 is used in nodejs for starting the debugger on an already running process, if this is the functionality you were after, you could use the undocumented api:
process._debugProcess(pid);

This will start the debugger on the process.

Source:

Sending SIGUSR1 IPC in Windows by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply