mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
os: stub out support for some more features
This is necessary for the following: - to make sure os/exec can be imported - to make sure internal/testenv can be imported The internal/testenv package (which imports os/exec) is used by a lot of tests. By adding support for it, more tests can be run. This commit adds a bunch of new packages that now pass all tests.
This commit is contained in:
committed by
Ron Evans
parent
6cbaed75c8
commit
718746dd21
@@ -16,3 +16,36 @@ func Getpid() int {
|
||||
func Getppid() int {
|
||||
return syscall.Getppid()
|
||||
}
|
||||
|
||||
type ProcAttr struct {
|
||||
Dir string
|
||||
Env []string
|
||||
Files []*File
|
||||
Sys *syscall.SysProcAttr
|
||||
}
|
||||
|
||||
type ProcessState struct {
|
||||
}
|
||||
|
||||
func (p *ProcessState) String() string {
|
||||
return "" // TODO
|
||||
}
|
||||
func (p *ProcessState) Success() bool {
|
||||
return false // TODO
|
||||
}
|
||||
|
||||
type Process struct {
|
||||
Pid int
|
||||
}
|
||||
|
||||
func StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error) {
|
||||
return nil, &PathError{"fork/exec", name, ErrNotImplemented}
|
||||
}
|
||||
|
||||
func (p *Process) Wait() (*ProcessState, error) {
|
||||
return nil, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (p *Process) Kill() error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user