From d5f25d2727c09ae1fc53f7749ed5032829a1ef68 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 11 Apr 2016 18:27:11 +0100 Subject: [PATCH] proxy: keep the fd open to the control file A future version of the 9P server will shutdown the forward on 9P clunk, so if this process crashes the forward will be cleaned up properly. Signed-off-by: David Scott --- alpine/packages/proxy/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/alpine/packages/proxy/main.go b/alpine/packages/proxy/main.go index fda26965d..78fc7c13f 100644 --- a/alpine/packages/proxy/main.go +++ b/alpine/packages/proxy/main.go @@ -63,9 +63,8 @@ func exposePort(host net.Addr, port int) error { log.Printf("Failed to read from /port/%s/ctl: %#v\n", name, err) return err } - // TODO: consider whether close/clunk of ctl would be a better tear down - // signal - ctl.Close() + // We deliberately keep the control file open since 9P clunk + // will trigger a shutdown on the host side. response := string(results[0:count]) if strings.HasPrefix(response, "ERROR ") {