Skip to content

Commit 797ef15

Browse files
committed
link
Signed-off-by: leongross <leon.gross@9elements.com>
1 parent 80fce6e commit 797ef15

File tree

4 files changed

+10
-111
lines changed

4 files changed

+10
-111
lines changed

src/os/signal/signal_linux.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/os/signal/signal_linux_test.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/runtime/sigqueue.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

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)