mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
src/os: add stubs for exec.ExitError and ProcessState.ExitCode
This commit adds stubs for the `ExitError` struct of the `exec` package and `ProcessState.ExitCode()` of the `os` package. Since the `os/exec` is listed as unsupported, stubbing these methods and structs should be enough to get programs that use these to compile.
This commit is contained in:
@@ -34,6 +34,12 @@ func (p *ProcessState) Success() bool {
|
||||
return false // TODO
|
||||
}
|
||||
|
||||
// ExitCode returns the exit code of the exited process, or -1
|
||||
// if the process hasn't exited or was terminated by a signal.
|
||||
func (p *ProcessState) ExitCode() int {
|
||||
return -1 // TODO
|
||||
}
|
||||
|
||||
type Process struct {
|
||||
Pid int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user