Note that there are some explanatory texts on larger screens.

plurals
  1. POSending an arbitrary Signal in Windows?
    primarykey
    data
    text
    <p>Linux supports sending an arbitrary Posix-Signal such as <code>SIGINT</code> or <code>SIGTERM</code> to a process using the <code>kill</code>-Command. While <code>SIGINT</code> and <code>SIGTERM</code> are just boring old ways to end a process in a friendly or not-so-friendly kind of way, <code>SIGQUIT</code> is meant to trigger a core dump. This can be used to trigger a running Java VM to print out a thread dump, including the stacktraces of all running threads -- neat! After printing the debugging info, the Java VM will continue doing whatever it was doing before; in fact the thread dump just happens in another spawned thread of maximum priority. (You can try this out yourself by using <code>kill -3 &lt;VM-PID&gt;</code>.)</p> <p>Note that you can also register your own signal handlers using the (unsupported!) <code>Signal</code> and <code>SignalHandler</code> classes in the <code>sun.misc</code>-package, so you can have all kinds of fun with it.</p> <p><em>However, I have yet to find a way to send a signal to a Windows process.</em> Signals are created by certain user inputs: <code>Ctrl-C</code> triggers a <code>SIGINT</code> on both platforms, for instance. But there does not seem to be any utility to manually send a signal to a running, but non-interactive process on Windows. The obvious solution is to use the Cygwin <code>kill</code> executable, but while it can end Windows processes using the appropriate Windows API, I could not send a <code>SIGBREAK</code> (the Windows equivalent to <code>SIGQUIT</code>) with it; in fact I think the only signal it is able to send to Windows processes is <code>SIGTERM</code>.</p> <p>So, to make a long story short and to repeat the headline: How to I send an arbitrary signal to a process in Windows?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload