mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
unix: add Getsid function on Solaris
Change-Id: I04446dc775a1d7f7c5f6184c389e5814dacb16eb Reviewed-on: https://go-review.googlesource.com/c/sys/+/410370 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
bc2c85ada1
commit
635b8c9b7f
@@ -618,6 +618,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Getpriority(which int, who int) (n int, err error)
|
||||
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||
//sysnb Getsid(pid int) (sid int, err error)
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sys Kill(pid int, signum syscall.Signal) (err error)
|
||||
|
||||
@@ -66,6 +66,7 @@ import (
|
||||
//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
|
||||
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
|
||||
//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
|
||||
//go:cgo_import_dynamic libc_getsid getsid "libc.so"
|
||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
|
||||
//go:cgo_import_dynamic libc_getuid getuid "libc.so"
|
||||
//go:cgo_import_dynamic libc_kill kill "libc.so"
|
||||
@@ -202,6 +203,7 @@ import (
|
||||
//go:linkname procGetpriority libc_getpriority
|
||||
//go:linkname procGetrlimit libc_getrlimit
|
||||
//go:linkname procGetrusage libc_getrusage
|
||||
//go:linkname procGetsid libc_getsid
|
||||
//go:linkname procGettimeofday libc_gettimeofday
|
||||
//go:linkname procGetuid libc_getuid
|
||||
//go:linkname procKill libc_kill
|
||||
@@ -339,6 +341,7 @@ var (
|
||||
procGetpriority,
|
||||
procGetrlimit,
|
||||
procGetrusage,
|
||||
procGetsid,
|
||||
procGettimeofday,
|
||||
procGetuid,
|
||||
procKill,
|
||||
@@ -1044,6 +1047,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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetsid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettimeofday(tv *Timeval) (err error) {
|
||||
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
Reference in New Issue
Block a user