github.com/lovishpuri/go-40569/src@v0.0.0-20230519171745-f8623e7c56cf/os/wait6_netbsd.go (about)

     1  // Copyright 2022 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 os
     6  
     7  import (
     8  	"syscall"
     9  	"unsafe"
    10  )
    11  
    12  const _P_PID = 1 // not 0 as on FreeBSD and Dragonfly!
    13  
    14  func wait6(idtype, id, options int) (status int, errno syscall.Errno) {
    15  	var status32 int32 // C.int
    16  	_, _, errno = syscall.Syscall6(syscall.SYS_WAIT6, uintptr(idtype), uintptr(id), uintptr(unsafe.Pointer(&status32)), uintptr(options), 0, 0)
    17  	return int(status32), errno
    18  }