rsc.io/go@v0.0.0-20150416155037-e040fd465409/src/syscall/exec_solaris_test.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build solaris 6 7 package syscall 8 9 var ( 10 procGetpgid = modlibc.NewProc("getpgid") 11 procGetpgrp = modlibc.NewProc("getpgrp") 12 ) 13 14 func Getpgid(pid int) (pgid int, err error) { 15 r0, _, e1 := sysvicall6(procGetpgid.Addr(), 1, uintptr(pid), 0, 0, 0, 0, 0) 16 pgid = int(r0) 17 if e1 != 0 { 18 err = e1 19 } 20 return 21 } 22 23 func Getpgrp() (pgrp int) { 24 r0, _, _ := sysvicall6(procGetpgrp.Addr(), 0, 0, 0, 0, 0, 0, 0) 25 pgrp = int(r0) 26 return 27 } 28 29 var Ioctl = ioctl