mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 12:33:42 +00:00
add FindProcess for posix
Signed-off-by: leongross <leon.gross@9elements.com>
This commit is contained in:
+6
-1
@@ -58,7 +58,7 @@ type Process struct {
|
||||
}
|
||||
|
||||
func StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error) {
|
||||
return nil, &PathError{"fork/exec", name, ErrNotImplemented}
|
||||
return nil, &PathError{Op: "fork/exec", Path: name, Err: ErrNotImplemented}
|
||||
}
|
||||
|
||||
func (p *Process) Wait() (*ProcessState, error) {
|
||||
@@ -77,3 +77,8 @@ func Ignore(sig ...Signal) {
|
||||
// leave all the signals unaltered
|
||||
return
|
||||
}
|
||||
|
||||
// Keep compatibility with golang and always succeed and return new proc with pid on Linux.
|
||||
func FindProcess(pid int) (*Process, error) {
|
||||
return findProcess(pid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user