From edc53e1f144fe5d1be8c787992ea6e9d9067ebf6 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 22 Apr 2015 18:03:18 -0400 Subject: runtime: fix build after CL 9164 on Linux There is an assumption that the function executed in child thread created by runtime.close should not return. And different systems enforce that differently: some exit that thread, some exit the whole process. The test TestNewOSProc0 introduced in CL 9161 breaks that assumption, so we need to adjust the code to only exit the thread should the called function return. Change-Id: Id631cb2f02ec6fbd765508377a79f3f96c6a2ed6 Reviewed-on: https://go-review.googlesource.com/9246 Reviewed-by: Dave Cheney --- src/runtime/sys_linux_arm64.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/sys_linux_arm64.s') diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s index ea8520c51d..389fea0dde 100644 --- a/src/runtime/sys_linux_arm64.s +++ b/src/runtime/sys_linux_arm64.s @@ -361,10 +361,10 @@ nog: MOVD R12, R0 BL (R0) - // It shouldn't return. If it does, exit + // It shouldn't return. If it does, exit that thread. MOVW $111, R0 again: - MOVD $SYS_exit_group, R8 + MOVD $SYS_exit, R8 SVC B again // keep exiting -- cgit v1.3