Hack to enable server to complete sending data to client (eg. xs -x "ls /foo" losing end of output)

This commit is contained in:
Russ Magee 2022-10-03 20:46:09 -07:00
parent bd0b48d98f
commit d99793554d

View file

@ -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()
}()