Monday, September 26, 2011

Re: Stop a libcall loop

On 27/09/11 08:13, niva wrote:
> Hi,
>
> I have done a dll that go into a while loop.
>
> It freeze gvim interface and I wonder if I can recode this loop in
> order to stop it by signal sent or another way ?
>
> Thanks for help
>

Hm, here are a few ideas:

1. Have you tried <Esc> or <Ctrl-Break>? Does it do anything? If neither
does, maybe you could test for an Esc and/or a Ctrl-Break in the loop in
order to terminate it early.

2. Maybe you could send Vim a signal that it doesn't use, and intercept
it in the DLL? Not sure which signal though; under Linux I would have
suggested SIGUSR2. This requires adding a signal handler to the DLL,
chaining with any signal handler already installed in the caller.

3. Maybe you could send Vim a signal that it does intercept, but if (1)
above doesn't work, it might terminate Vim (under Linux I would have
suggested SIGHUP, or if that doesn't work, SIGTERM).

4. If worst comes to worst, you may have to kill Vim (under Linux:
SIGKILL; under Windows: open the Task Manager, probably by Ctrl-Alt-Del,
then select Vim and terminate it).


Best regards,
Tony.
--
There once was an old man from Esser,
Who's knowledge grew lesser and lesser.
It at last grew so small,
He knew nothing at all,
And now he's a College Professor.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: