1 // waitpid.go -- Wait4 for systems without wait4, but with waitpid.
3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 func libc_waitpid(Pid_t
, *int, int) Pid_t
__asm__ ("waitpid")
11 func Wait4(pid
int, wstatus
*WaitStatus
, options
int, rusage
*Rusage
) (wpid
int, errno
int) {
13 r
:= libc_waitpid(Pid_t(pid
), &status
, options
)
19 *wstatus
= WaitStatus(status
)