Patchwork libgo patch committed: Call exit rather than _exit

login
register
mail settings
Submitter Ian Taylor
Date Feb. 28, 2012, 8:57 p.m.
Message ID <mcrhayar80i.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/143542/
State New
Headers show

Comments

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.

Ian

Patch

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;