Source file src/internal/syscall/unix/waitid_linux.go
1 // Copyright 2024 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 package unix 6 7 import ( 8 "syscall" 9 "unsafe" 10 ) 11 12 const ( 13 P_PID = 1 14 P_PIDFD = 3 15 ) 16 17 func Waitid(idType int, id int, info *SiginfoChild, options int, rusage *syscall.Rusage) error { 18 _, _, errno := syscall.Syscall6(syscall.SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0) 19 if errno != 0 { 20 return errno 21 } 22 return nil 23 } 24