Skip to content

Commit

Permalink
syscall: use SYS_EXIT_GROUP in CLONE_PIDFD feature check child
Browse files Browse the repository at this point in the history
Inside Google we have seen issues with QEMU user mode failing to wake a
parent waitid when this child exits with SYS_EXIT. This bug appears to
not affect SYS_EXIT_GROUP.

It is currently unclear if this is a general QEMU or specific to
Google's configuration, but SYS_EXIT and SYS_EXIT_GROUP are semantically
equivalent here, so we can use the latter here in case this is a general
QEMU bug.

For #68976.

Change-Id: I34e51088c9a6b7493a060e2a719a3cc4a3d54aa0
Reviewed-on: https://go-review.googlesource.com/c/go/+/617417
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
prattmic committed Oct 3, 2024
1 parent ce60f70 commit 47a9935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscall/exec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,6 @@ func doCheckClonePidfd(pidfd *int32) (pid uintptr, errno Errno) {
}

for {
RawSyscall(SYS_EXIT, 0, 0, 0)
RawSyscall(SYS_EXIT_GROUP, 0, 0, 0)
}
}

0 comments on commit 47a9935

Please sign in to comment.