From d99793554da451290bc4f0ca83952e6093d11906 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Mon, 3 Oct 2022 20:46:09 -0700 Subject: [PATCH] Hack to enable server to complete sending data to client (eg. xs -x "ls /foo" losing end of output) --- xsd/xsd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xsd/xsd.go b/xsd/xsd.go index c1bd039..8be3ab8 100755 --- a/xsd/xsd.go +++ b/xsd/xsd.go @@ -327,6 +327,8 @@ func runShellAs(who, hname, ttype, cmd string, interactive bool, //nolint:funlen // #gv:s/label=\"runShellAs\$1\"/label=\"deferPtmxClose\"/ defer func() { //logger.LogDebug(fmt.Sprintf("[Exited process was %d]", c.Process.Pid)) + //FIXME: Ensure socket has sent all data to client prior to closing + time.Sleep(100 * time.Millisecond) //HACK: syscall.Shutdown() ? -rlm _ = ptmx.Close() }()