runtime: testing runtime

This commit is contained in:
Li Jie
2025-02-14 17:18:13 +08:00
parent 66909b3000
commit 5329f28580
83 changed files with 3376 additions and 2061 deletions

View File

@@ -59,8 +59,12 @@ func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err e
// runtime.KeepAlive(attr)
if e != nil {
return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
// TODO(lijie): workaround with type assertion
if r, ok := e.(syscall.Errno); !ok || r != 0 {
return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
}
}
println("StartProcess", pid, h, e)
return newProcess(pid, h), nil
}