Skip to content

Commit a6e4bad

Browse files
committed
add signal implementations for linux arm64
1 parent 752af5f commit a6e4bad

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/os/exec_linux_arm64.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,29 @@
66

77
package os
88

9-
import "errors"
9+
import (
10+
"errors"
11+
"runtime"
12+
"syscall"
13+
)
14+
15+
var (
16+
Interrupt Signal = syscall.SIGINT
17+
Kill Signal = syscall.SIGKILL
18+
)
19+
20+
// Keep compatible with golang and always succeed and return new proc with pid on Linux.
21+
func findProcess(pid int) (*Process, error) {
22+
return &Process{Pid: pid}, nil
23+
}
24+
25+
func (p *Process) release() error {
26+
// NOOP for unix.
27+
p.Pid = -1
28+
// no need for a finalizer anymore
29+
runtime.SetFinalizer(p, nil)
30+
return nil
31+
}
1032

1133
// On the aarch64 architecture, the fork system call is not available.
1234
// Therefore, the fork function is implemented to return an error.

0 commit comments

Comments
 (0)