From: Tor Didriksen Date: September 30 2010 6:02am Subject: Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3305) Bug#52002 List-Archive: http://lists.mysql.com/commits/119472 Message-Id: <4CA4280A.1070607@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2010-09-29 10:02, Vladislav Vaintroub wrote: > Hi Tor, > since you do not use signals on Windows (as there is no kill() there ), you do not really need to include that header, right ? > Neither sys/types.h above , if I understand it correctly. > > Thanks for commenting Vlad. I guess you are right, no need for sys/types.h on windows. >> > +#ifndef __WIN__ >> > +#include >> > +#endif >> >> > >> > +/* >> > + Make the program fail, without creating a core file. >> > + abort() will send SIGABRT which (most likely) generates core. >> > + Use SIGKILL instead, which cannot be caught. >> > + An alternative would be to use _exit(EXIT_FAILURE), >> > + but then valgrind would report lots of memory leaks. >> > + */ >> > Somehow I'm unhappy with valgrind workarounds, it obfuscates of correct code in order to please the tool, but well. I cannot propose > anything better either. > > Well, mtr isn't really designed for crash/recovery testing. For the test cases involved here, I think it is better to simply kill the server immediately, rather than to do a normal exit. (and we certainly don't want any core files left behind) -- didrik