This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libgo patch committed: Call exit rather than _exit
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Tue, 28 Feb 2012 12:57:17 -0800
- Subject: libgo patch committed: Call exit rather than _exit
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.68.208.136 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
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;