From e84ce0802dac6d5a780acc2f54113b55f49f4b07 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 17 Nov 2022 12:51:56 +1100 Subject: [PATCH] runtime: change tfork behaviour to unbreak openbsd/mips64 Currently, tfork on openbsd/mips64 returns the thread ID on success and a negative error number on error. In CL#447175, newosproc was changed to assume that a non-zero value is an error - return zero on success to match this expectation. Change-Id: I955efad49b149146165eba3d05fe40ba75caa098 Reviewed-on: https://go-review.googlesource.com/c/go/+/451257 Reviewed-by: Ian Lance Taylor Reviewed-by: Joedian Reid TryBot-Result: Gopher Robot Run-TryBot: Joel Sing --- src/runtime/sys_openbsd_mips64.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/sys_openbsd_mips64.s b/src/runtime/sys_openbsd_mips64.s index cc37e52e16..affd586742 100644 --- a/src/runtime/sys_openbsd_mips64.s +++ b/src/runtime/sys_openbsd_mips64.s @@ -277,7 +277,7 @@ TEXT runtime·tfork(SB),NOSPLIT,$0 // In parent, return. BEQ R2, 3(PC) - MOVW R2, ret+40(FP) + MOVW $0, ret+40(FP) RET // Initialise m, g. -- 2.50.0