X-Git-Url: http://nitlanguage.org diff --git a/c_src/core__exec._ffi.c b/c_src/core__exec._ffi.c index dd841d5..75726e3 100644 --- a/c_src/core__exec._ffi.c +++ b/c_src/core__exec._ffi.c @@ -19,17 +19,40 @@ #include #include #include - #include #include -long exec___NativeString_system___impl( char* self ) + #include + +#ifdef _WIN32 + #include + #include +#else + #include +#endif + + typedef struct se_exec_data se_exec_data_t; + struct se_exec_data { +#ifdef _WIN32 + HANDLE h_process; + HANDLE h_thread; +#endif + pid_t id; + int running; + int status; + int in_fd; + int out_fd; + int err_fd; + }; +long core__exec___CString_system___impl( char* self ) { -#line 332 "../lib/core/exec.nit" +#line 457 "../lib/core/exec.nit" int status = system(self); +#ifndef _WIN32 if (WIFSIGNALED(status) && WTERMSIG(status) == SIGINT) { // system exited on SIGINT: in my opinion the user wants the main to be discontinued kill(getpid(), SIGINT); } +#endif return status; }