1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

WL#5161 : Cross-platform build with CMake

This commit is contained in:
Vladislav Vaintroub
2009-11-09 12:32:48 +01:00
parent 411a6bfeb9
commit 13cd7170cc
110 changed files with 6220 additions and 985 deletions

View File

@ -13,5 +13,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
IF (WIN32)
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
ELSE()
ADD_EXECUTABLE(my_safe_process safe_process.cc)
ENDIF()
INSTALL(TARGETS my_safe_process DESTINATION "mysql-test/lib/My/SafeProcess")
IF(WIN32)
INSTALL(TARGETS my_safe_kill DESTINATION "mysql-test/lib/My/SafeProcess")
ENDIF()
INSTALL(FILES safe_process.pl Base.pm DESTINATION "mysql-test/lib/My/SafeProcess")

View File

@ -24,6 +24,7 @@
#include <windows.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
int main(int argc, const char** argv )
{

View File

@ -57,6 +57,7 @@
#include <stdio.h>
#include <tlhelp32.h>
#include <signal.h>
#include <stdlib.h>
static int verbose= 0;
static char safe_process_name[32]= {0};
@ -248,6 +249,10 @@ int main(int argc, const char** argv )
Make all processes associated with the job terminate when the
last handle to the job is closed.
*/
#ifndef JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000
#endif
jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
if (SetInformationJobObject(job_handle, JobObjectExtendedLimitInformation,
&jeli, sizeof(jeli)) == 0)