提交 912cf014 编写于 作者: S shirong 提交者: jia zhang

rune: Fix #93 (Workround the argv problem between rune and occlum)

Signed-off-by: Nshirong <shirong@linux.alibaba.com>
Signed-off-by: jia zhang's avatarJia Zhang <zhang.jia@linux.alibaba.com>
上级 4058b8ea
......@@ -78,10 +78,9 @@ func (pal *enclaveRuntimePalApiV2) exec(cmd []string, envs []string, stdio [3]*o
var exe *C.char
argc := len(cmd)
pargs := make([]*C.char, argc)
exe = C.CString(cmd[0])
defer C.free(unsafe.Pointer(exe))
if argc > 1 {
exe = C.CString(cmd[0])
defer C.free(unsafe.Pointer(exe))
cmd = cmd[1:]
for i, arg := range cmd {
logrus.Debugf("arg[%d]: %s", i, arg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册