[slim-vim] kill(2) for Windows
Brad Beveridge
brad.beveridge at gmail.com
Thu Aug 31 17:24:02 CDT 2006
On 31/08/06, Brad Beveridge <brad.beveridge at gmail.com> wrote:
> On 31/08/06, Jim Bailey <dgym.bailey at gmail.com> wrote:
> >
> > 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
>
> Can/do Lisp's that run on Windows (ie, CLISP) catch that signal and
> BREAK? I use kill to both terminate the Lisp process, and send
> SIGINT.
>
> Cheers
> Brad
You can use raise () to send a signal to yourself - which might be
what Slime on win32 does, see
http://common-lisp.net/pipermail/slime-devel/2005-July/003735.html
Brad
More information about the slim-vim
mailing list