提交 a937ea0b 编写于 作者: jia zhang's avatar jia zhang

rune/libenclave: Sanity check the returned error of rune exec

If the returned error is empty, don't raise an error in any way.
Signed-off-by: jia zhang's avatarJia Zhang <zhang.jia@linux.alibaba.com>
上级 68547a5f
......@@ -302,7 +302,13 @@ func remoteExec(agentPipe *os.File, config *configs.InitEnclaveConfig, notifySig
logrus.Debug("awaiting for signal forwarder exiting ...")
<-sigForwarderExit
logrus.Debug("signal forwarder exited")
return resp.Exec.ExitCode, fmt.Errorf(resp.Exec.Error)
if resp.Exec.Error == "" {
err = nil
} else {
err = fmt.Errorf(resp.Exec.Error)
}
return resp.Exec.ExitCode, err
}
func forwardSignalToParent(conn io.Writer, notifySignal chan os.Signal, notifyExit <-chan struct{}) <-chan struct{} {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册