openconnect: forward SIGINT to app
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 28 Oct 2014 10:58:42 +0000 (11:58 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 28 Oct 2014 10:58:52 +0000 (11:58 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/openconnect/Makefile
net/openconnect/files/openconnect-wrapper

index 9fd40d6482da5b1e317984e6a16e91f8e953690c..c14dd32a6fc423932311c36b8ba29ecfc15cc4b7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=6.00
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
index 744e5a5cd00ee22a24ea10623a07757abbd15f86..082dfba73ae551ca9fdf36b9ebe2fc06f10de2d7 100755 (executable)
@@ -22,7 +22,17 @@ cleanup()
        exit 0
 }
 
-trap cleanup 1 2 3 6 15
+cleanup2()
+{
+       if ! test -z "$pid";then
+               kill -2 $pid
+               wait $pid
+       fi
+       exit 0
+}
+
+trap cleanup2 2
+trap cleanup 1 3 6 15
 
 rm -f "$pidfile"
 /usr/sbin/openconnect $* <$pwfile &