mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 14:47:28 -04:00
x/sys/unix: add Getsid on linux
Fixes golang/go#17872 Change-Id: I4bfe7b47c36c3d2f0c08a2adeba595231e507b81 Reviewed-on: https://go-review.googlesource.com/33050 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
9a2e24c373
commit
b699b70325
@@ -572,6 +572,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
|
||||
Reference in New Issue
Block a user