mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os, syscall: use wait6 to avoid wait/kill race on netbsd
Follow CL 23967 and CL 24021 which did the same on linux and freebsd, respectively. Updates #13987 Updates #16028 Change-Id: I95b13d8ddde4cea1ef4fb7d655f1ad1a219d13aa Reviewed-on: https://go-review.googlesource.com/c/go/+/315281 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
138d2c9b88
commit
45600bcd61
10 changed files with 12 additions and 4 deletions
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || darwin || (js && wasm) || netbsd || openbsd || solaris
|
||||
// +build aix darwin js,wasm netbsd openbsd solaris
|
||||
//go:build aix || darwin || (js && wasm) || openbsd || solaris
|
||||
// +build aix darwin js,wasm openbsd solaris
|
||||
|
||||
package os
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build dragonfly || freebsd
|
||||
// +build dragonfly freebsd
|
||||
//go:build dragonfly || freebsd || netbsd
|
||||
// +build dragonfly freebsd netbsd
|
||||
|
||||
package os
|
||||
|
||||
|
|
|
|||
|
|
@ -1427,6 +1427,7 @@ const (
|
|||
WALTSIG = 0x4
|
||||
WCLONE = 0x4
|
||||
WCOREFLAG = 0x80
|
||||
WEXITED = 0x20
|
||||
WNOHANG = 0x1
|
||||
WNOWAIT = 0x10000
|
||||
WNOZOMBIE = 0x20000
|
||||
|
|
|
|||
|
|
@ -1417,6 +1417,7 @@ const (
|
|||
WALTSIG = 0x4
|
||||
WCLONE = 0x4
|
||||
WCOREFLAG = 0x80
|
||||
WEXITED = 0x20
|
||||
WNOHANG = 0x1
|
||||
WNOWAIT = 0x10000
|
||||
WNOZOMBIE = 0x20000
|
||||
|
|
|
|||
|
|
@ -1403,6 +1403,7 @@ const (
|
|||
WALTSIG = 0x4
|
||||
WCLONE = 0x4
|
||||
WCOREFLAG = 0x80
|
||||
WEXITED = 0x20
|
||||
WNOHANG = 0x1
|
||||
WNOWAIT = 0x10000
|
||||
WNOZOMBIE = 0x20000
|
||||
|
|
|
|||
|
|
@ -1417,6 +1417,7 @@ const (
|
|||
WALTSIG = 0x4
|
||||
WCLONE = 0x4
|
||||
WCOREFLAG = 0x80
|
||||
WEXITED = 0x20
|
||||
WNOHANG = 0x1
|
||||
WNOWAIT = 0x10000
|
||||
WNOZOMBIE = 0x20000
|
||||
|
|
|
|||
|
|
@ -271,4 +271,5 @@ const (
|
|||
SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
|
||||
SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
|
||||
SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
|
||||
SYS_WAIT6 = 481 // { int|sys||wait6(idtype_t idtype, id_t id, int *status, int options, struct wrusage *wru, siginfo_t *info); }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -271,4 +271,5 @@ const (
|
|||
SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
|
||||
SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
|
||||
SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
|
||||
SYS_WAIT6 = 481 // { int|sys||wait6(idtype_t idtype, id_t id, int *status, int options, struct wrusage *wru, siginfo_t *info); }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -271,4 +271,5 @@ const (
|
|||
SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
|
||||
SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
|
||||
SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
|
||||
SYS_WAIT6 = 481 // { int|sys||wait6(idtype_t idtype, id_t id, int *status, int options, struct wrusage *wru, siginfo_t *info); }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -271,4 +271,5 @@ const (
|
|||
SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
|
||||
SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
|
||||
SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
|
||||
SYS_WAIT6 = 481 // { int|sys||wait6(idtype_t idtype, id_t id, int *status, int options, struct wrusage *wru, siginfo_t *info); }
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue