Repository navigation
Expand file tree
/
Copy pathexec_other.go
More file actions
70 lines (55 loc) · 1.6 KB
/
Copy pathexec_other.go
File metadata and controls
70 lines (55 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//go:build (!aix && !android && !darwin && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris) || baremetal || tinygo.wasm || nintendoswitch
package os
import "syscall"
var (
Interrupt Signal = syscall.SIGINT
Kill Signal = syscall.SIGKILL
)
func findProcess(pid int) (*Process, error) {
return &Process{Pid: pid}, nil
}
func (p *Process) release() error {
p.Pid = -1
return nil
}
// ProcessState is a placeholder on targets that have no process model.
type ProcessState struct {
}
func (p *ProcessState) String() string {
return "" // TODO
}
func (p *ProcessState) Success() bool {
return false // TODO
}
// Sys returns system-dependent exit information about
// the process. Convert it to the appropriate underlying
// type, such as syscall.WaitStatus on Unix, to access its contents.
func (p *ProcessState) Sys() interface{} {
return nil // TODO
}
func (p *ProcessState) Exited() 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
}
func (p *Process) Wait() (*ProcessState, error) {
if p.Pid == -1 {
return nil, syscall.EINVAL
}
return nil, ErrNotImplemented
}
func (p *Process) Kill() error {
return ErrNotImplemented
}
func (p *Process) Signal(sig Signal) error {
return ErrNotImplemented
}
func forkExec(_ string, _ []string, _ *ProcAttr) (pid int, err error) {
return 0, ErrNotImplemented
}
func startProcess(_ string, _ []string, _ *ProcAttr) (proc *Process, err error) {
return &Process{Pid: 0}, ErrNotImplemented
}