This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgo patch committed: Call exit rather than _exit


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

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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]