[slim-vim] kill(2) for Windows

Jim Bailey dgym.bailey at gmail.com
Thu Aug 31 16:57:18 CDT 2006


You will need the process handle - obtained during the CreateProcess()
(or spawn) call, then you can:

BOOL TerminateProcess(
  HANDLE hProcess,  // handle to the process
  UINT uExitCode   // exit code for the process
  );

If you need to test is a process is still alive I think you can use 
WaitForSingleObject(...) with a very short (maybe 0) time out to do
that.

On Thu, 31 Aug 2006 17:54:19 -0400
Larry Clapp <larry at theclapp.org> wrote:

> Greetings.  Trying to compile Vim+ECL for native Win32, Brad's
> cl_vim_kill_int() doesn't compile, because Windows doesn't have a
> kill() function (or possibly I'm just stupid and haven't found the
> correct include file).
> 
> So, if you know how to do what kill does (on Unix) on Windows (i.e.
> terminate a process or test if it still exists), please speak up.  I
> Googled around a bit and found several ways to *catch* signals but no
> way to *send* them.  (Or, again, maybe I'm just stupid.  :)  I'm using
> Microsoft Visual C++ 8, aka (I think) Visual Studio 2005.
> 
> (I #ifdef'ed out that code and got a clean compile, so I'm pretty
> close to having a good Vim/Win32 to post.)
> 
> Thanks!
> 
> -- Larry
> 
> _______________________________________________
> slim-vim mailing list
> slim-vim at lispniks.com
> http://www.lispniks.com/mailman/listinfo/slim-vim


More information about the slim-vim mailing list