aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/syscall_windows.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2017-06-08 15:56:53 +1000
committerAlex Brainman <alex.brainman@gmail.com>2017-06-08 23:28:28 +0000
commitcfae35efa582eedb83f483b52fa35cf1269c562d (patch)
tree6c5eba18a1528a1486e0fefbdb47f7e3ec44f857 /src/runtime/syscall_windows.go
parent78cf0e56ce5372ed3bf81e41e4ab23f68d3eaa77 (diff)
downloadgo-cfae35efa582eedb83f483b52fa35cf1269c562d.tar.gz
go-cfae35efa582eedb83f483b52fa35cf1269c562d.zip
syscall: make windows Exit call runtime.exit
Both runtime.exit and syscall.Exit call Windows ExitProcess. But recently (CL 34616) runtime.exit was changed to ignore Windows CreateThread errors if ExitProcess is called. This CL adjusts syscall.Exit to do the same. Fixes #18253 (maybe) Change-Id: I6496c31b01e7c7d73b69c0b2ae33ed7fbe06736b Reviewed-on: https://go-review.googlesource.com/45115 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/syscall_windows.go')
-rw-r--r--src/runtime/syscall_windows.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/syscall_windows.go b/src/runtime/syscall_windows.go
index cd23b8da6b..ca8ea8b04f 100644
--- a/src/runtime/syscall_windows.go
+++ b/src/runtime/syscall_windows.go
@@ -207,3 +207,9 @@ func syscall_Syscall15(fn, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
cgocall(asmstdcallAddr, unsafe.Pointer(c))
return c.r1, c.r2, c.err
}
+
+//go:linkname syscall_exit syscall.Exit
+//go:nosplit
+func syscall_exit(code int) {
+ exit(int32(code))
+}