#At file:///export/home/didrik/repo/5.1-bugteam/ based on revid:luis.soares@stripped
3513 Tor Didriksen 2010-11-26
Bug #58426 Crashing tests not failing as they are supposed to on Solaris 10 debug
On this platform we either
- get lots of other signals
- or maybe we lose the KILL signal
Solution: loop with { kill; pause; } until process dies.
@ include/my_dbug.h
Let DBUG_SUICE loop forever until the KILL signal is delivered, and process dies.
modified:
include/my_dbug.h
=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h 2010-10-18 11:24:34 +0000
+++ b/include/my_dbug.h 2010-11-26 14:04:06 +0000
@@ -24,6 +24,7 @@
#include <unistd.h>
#endif
#include <signal.h>
+#include <stdio.h>
#endif /* not __WIN__ */
#if defined(__cplusplus) && !defined(DBUG_OFF)
@@ -160,7 +161,18 @@ extern void _db_flush_();
#ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT()
#else
-#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
+static inline void do_kill_and_pause_forever()
+{
+ fprintf(stderr, "SIGKILL myself\n");
+ fflush(stderr);
+ do
+ {
+ kill(getpid(), SIGKILL);
+ pause();
+ }
+ while(1);
+}
+#define DBUG_SUICIDE() (_db_flush_(), do_kill_and_pause_forever())
#endif
#else /* No debugger */
Attachment: [text/bzr-bundle] bzr/tor.didriksen@oracle.com-20101126140406-9v6it8v2xyjkuq2o.bundle