Pid returns the process ID
()
| 136 | |
| 137 | // Pid returns the process ID |
| 138 | func (p *Process) Pid() (int, error) { |
| 139 | // math.MinInt32 is returned here, because it's invalid value |
| 140 | // for the kill() system call. |
| 141 | if p.ops == nil { |
| 142 | return math.MinInt32, errInvalidProcess |
| 143 | } |
| 144 | return p.ops.pid(), nil |
| 145 | } |
| 146 | |
| 147 | // Signal sends a signal to the Process. |
| 148 | func (p *Process) Signal(sig os.Signal) error { |