libgo patch committed: Call exit rather than _exit

Message ID
State New
Headers show

Commit Message

Ian Taylor Feb. 28, 2012, 8:57 p.m.
The libgo runtime was calling _exit when a Go program finished.  There
was no particular reason for this, and it meant that --coverage did not
work becase the .gcda file was never generated.  This patch fixes that.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.



diff -r 4dd8ef0f17b4 libgo/runtime/runtime.h
--- a/libgo/runtime/runtime.h	Fri Feb 24 18:10:56 2012 -0800
+++ b/libgo/runtime/runtime.h	Tue Feb 28 12:53:09 2012 -0800
@@ -348,7 +348,7 @@ 
 #define runtime_strcmp(s1, s2) __builtin_strcmp((s1), (s2))
 #define runtime_mcmp(a, b, s) __builtin_memcmp((a), (b), (s))
 #define runtime_memmove(a, b, s) __builtin_memmove((a), (b), (s))
-#define runtime_exit(s) _exit(s)
+#define runtime_exit(s) exit(s)
 MCache*	runtime_allocmcache(void);
 void	free(void *v);
 struct __go_func_type;