]> Cypherpunks repositories - gostls13.git/commit
internal/syscall/unix, os: add and use Waitid syscall wrapper on linux
authorTobias Klauser <tklauser@distanz.ch>
Tue, 19 Nov 2024 12:38:42 +0000 (13:38 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 19 Nov 2024 20:40:51 +0000 (20:40 +0000)
commite82308c198fbc26800fd1780cbd9f29935b210c5
tree7a08890e7b9d806be77594704ae087322c53de3b
parent5fdadffe3d20be9de491835c4351dee5dc81c42c
internal/syscall/unix, os: add and use Waitid syscall wrapper on linux

Instead of open-coding the waitid syscall wrapper add it to
internal/syscall/unix. As the syscall is currently only used on Linux,
switch the implementation in os.(*Process).blockUntilWaitable to use the
128-byte unix.SiginfoChild type instead of a plain 128-byte buffer.

Also use ignoringEINTR for the waitid calls instead of open-coding it.

Change-Id: I8dc47e361faa1f5e912d5de021f119c91c9f12f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/629655
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
src/internal/syscall/unix/waitid_linux.go [new file with mode: 0644]
src/os/pidfd_linux.go
src/os/wait_waitid.go