[GIT PULL] Refactor signal handling, change log levels, API updates

David Woodhouse dwmw2 at infradead.org
Thu Jun 12 03:25:35 PDT 2014


On Tue, 2014-06-10 at 00:12 -0700, Kevin Cernekee wrote:
> This patch series updates the command-line client to implement the
> signal handling changes discussed previously on the list:
> 
>     SIGINT: Disconnect and logoff, run vpnc-script accordingly
>     SIGHUP: Disconnect and run vpnc-script (cookie can be re-used)
>     SIGTERM: Just die. Disconnect without logoff, no vpnc-script
>     SIGUSR2: Reconnect to server immediately as if DPD triggered.

../main.c: In function 'main':
../main.c:1120:21: error: 'SIGHUP' undeclared (first use in this
function)
   if (sig_caught == SIGHUP) {
                     ^
../main.c:1120:21: note: each undeclared identifier is reported only
once for each function it appears in
make[1]: *** [openconnect-main.o] Error 1
make[1]: Leaving directory `/ssd/git/openconnect/win64'


Ok, I can litter this with more #ifdef _WIN32 or I can define _POSIX so
that the Windows build actually does have definitions of the signal
numbers.

But perhaps the cleaner answer here is to ditch the sig_caught variable
entirely, and let openconnect_mainloop() return a value indicating *why*
it returned?

-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140612/d17b4aa8/attachment.bin>


More information about the openconnect-devel mailing list