[Openvpn-devel] Adding a ctrl-C handler in windows

2015-11-07 Thread Selva Nair
Hi,

I plan to add a control-C handler in win32.c. The handler will simply
map it to SIGTERM. Is there any particular reason why control-C is not
currently handled?

We need this functionality to use nssm properly. When
openvpn is started by nssm, the service has no good ways of
gracefully terminating the process. "nssm stop service-name" can send
control-C but that is not handled by openvpn. So the default handler
catches the signal and just kills the process -- thus the MI or the logs
get no reports of the exit, no exit-notify to the remote are
generated etc..

Hope I'm not missing some obvious ways to correctly terminate the
process from nssm.

Thanks,

Selva



Re: [Openvpn-devel] [PATCH applied] Re: Fix termination when windows suspends/sleeps

2015-11-07 Thread Selva Nair
Hi,

On Fri, Nov 6, 2015 at 4:12 PM, Gert Doering  wrote:
> On Fri, Nov 06, 2015 at 10:08:59PM +0100, Gert Doering wrote:
>> ACK.  Explanation makes sense, logs and testers demonstrate that it indeed
>> fixes a significant problem, and the code is sane :-) - thanks.
>>
>> Your patch has been applied to the master and release/2.3 branch.
>>
>> commit ea66a2b5cdb21422139c421b4d3733e1c1c3937e (master)
>> commit 0d4ba251879c702b9474e26ff73a4f559d922d4f (release/2.3)
>
> Uh, and because I forgot to mention it - Samuli's buildbot will build a
> windows snapshot from git master containing this, and it will be part
> of 2.3.9 when we release this (no timeline yet).

Thanks.

Speaking of the windows installer, the GUI needs a small change to
play nice with this patch. Else the GUI will end up killing openvpn on
resume.. Not sure where to send patches for the GUI.

Selva