title: How to get the Status of a Windows Process (Running or Terminated) using C language?
body: <p>I want to know weather the Process on Windows task manager is Terminated?
  (that means I want to make a function like database trigger)
  at the moment that some particular Process is terminated I want to do some task.</p>
  
  <p>I tired it since day before yesterday in so many ways. but I did't get correct fit.</p>
  
  <p>Thank you in Advance.</p>
  
  <pre><code>#include "stdio.h"
  #include "Windows.h"
  
  int main()
  {
  HANDLE jvminst = GetCurrentProcess();
  
  printf("%d %d \n",jvminst,WaitForSingleObject(jvminst,0));
  
  return 0;   
  }
  </code></pre>