On Mon, Nov 2, 2015 at 3:31 AM, Samuli Seppänen <sam...@openvpn.net> wrote:
>>
>> I thought adding --service to the command line may cure this, but it
>> doesn't. Any suggestions on how to teach openvpn to process termination
>> by nssm as a SIGTERM, or make nssm send a SIGTERM?
>
>
> Hi,
>
> Based on NSSM documentation forcibly killing the daemon is the last resort:
>
> <http://nssm.cc/usage#shutdown>


Yes, as per the docs, it sends control-C, WM_CLOSE, WM_QUIT and then
forcibly terminate. So when you execute  "nssm stop service-name", it
must be sending control-C. However, openvpn terminates writing nothing
to the log and without the EXIT message to the management interface.
Nor does it send exit-notify to the remote.

Looking at the code, it appears SIGTERM and SIGINT are not handled on
windows (does windows even have those signals?) so nssm sending
control-C may not be work with openvpn.

So the question is how to modify openvpn so that it will terminate on
control-C on windows?

Thanks,

Selva

Reply via email to