[lxc-devel] [lxd/master] proxy: remove UDP SIGKILL logic

brauner on Github lxc-bot at linuxcontainers.org
Fri Jun 15 14:39:40 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 478 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180615/6d5d6da9/attachment.bin>
-------------- next part --------------
From 66a31d68ec829ec790e144c71c7de84a9a9a4108 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 15 Jun 2018 15:44:18 +0200
Subject: [PATCH] proxy: remove UDP SIGKILL logic

If the source connection is closed and the corresponding file is closed too
the UDP listener will die anyway.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/main_forkproxy.go | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lxd/main_forkproxy.go b/lxd/main_forkproxy.go
index 074bb8c72..a103d9fc9 100644
--- a/lxd/main_forkproxy.go
+++ b/lxd/main_forkproxy.go
@@ -354,16 +354,12 @@ func (c *cmdForkproxy) Run(cmd *cobra.Command, args []string) error {
 	signal.Notify(sigs, syscall.SIGTERM)
 
 	// Wait for SIGTERM and close the listener in order to exit the loop below
-	killOnUDP := syscall.Getpid()
 	go func() {
 		<-sigs
 		terminate = true
 		file.Close()
 		if lAddr.connType == "udp" {
 			srcConn.Close()
-			// Kill ourselves since we will otherwise block on UDP
-			// connect() or poll().
-			syscall.Kill(killOnUDP, syscall.SIGKILL)
 		} else {
 			listener.Close()
 		}


More information about the lxc-devel mailing list