Commit d7223c6c authored by Ian Lance Taylor's avatar Ian Lance Taylor

runtime: correct implementation of raiseproc on Solaris

I forgot that the libc raise function only sends the signal to the
current thread.  We need to actually use kill and getpid here, as we
do on other systems.

Change-Id: Iac34af822c93468bf68cab8879db3ee20891caaf
Reviewed-on: https://go-review.googlesource.com/12704Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent d1cf5b89
......@@ -16,7 +16,9 @@ import "unsafe"
//go:cgo_import_dynamic libc_exit exit "libc.so"
//go:cgo_import_dynamic libc_fstat fstat "libc.so"
//go:cgo_import_dynamic libc_getcontext getcontext "libc.so"
//go:cgo_import_dynamic libc_getpid getpid "libc.so"
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
//go:cgo_import_dynamic libc_kill kill "libc.so"
//go:cgo_import_dynamic libc_madvise madvise "libc.so"
//go:cgo_import_dynamic libc_malloc malloc "libc.so"
//go:cgo_import_dynamic libc_mmap mmap "libc.so"
......@@ -449,7 +451,8 @@ func raise(sig int32) /* int32 */ {
}
func raiseproc(sig int32) /* int32 */ {
sysvicall1(&libc_raise, uintptr(sig))
pid := sysvicall0(&libc_getpid)
sysvicall2(&libc_kill, pid, uintptr(sig))
}
//go:nosplit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment