mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
Add process.Release for unix
Signed-off-by: leongross <leon.gross@9elements.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package os
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
@@ -24,3 +25,11 @@ var (
|
||||
func findProcess(pid int) (*Process, error) {
|
||||
return &Process{Pid: pid}, nil
|
||||
}
|
||||
|
||||
func (p *Process) release() error {
|
||||
// NOOP for unix.
|
||||
p.Pid = -1
|
||||
// no need for a finalizer anymore
|
||||
runtime.SetFinalizer(p, nil)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user