Skip to content

Commit a8aff20

Browse files
committed
link
Signed-off-by: leongross <leon.gross@9elements.com>
1 parent 76d5b3d commit a8aff20

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/syscall/syscall_libc.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ func Truncate(path string, length int64) (err error) {
215215
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
216216

217217
func Kill(pid int, sig Signal) (err error) {
218-
return ENOSYS // TODO
218+
result := libc_kill(int32(pid), int32(sig))
219+
if result < 0 {
220+
err = getErrno()
221+
}
222+
return
219223
}
220224

221225
type SysProcAttr struct{}
@@ -465,3 +469,8 @@ func libc_execve(filename *byte, argv **byte, envp **byte) int
465469
//
466470
//export truncate
467471
func libc_truncate(path *byte, length int64) int32
472+
473+
// int kill(pid_t pid, int sig);
474+
//
475+
//export kill
476+
func libc_kill(pid, sig int32) int32

0 commit comments

Comments
 (0)