| 3135 | */ |
| 3136 | |
| 3137 | static BOOL WINAPI console_event_handler( DWORD type ) |
| 3138 | { |
| 3139 | DBUG_ENTER("console_event_handler"); |
| 3140 | #ifndef EMBEDDED_LIBRARY |
| 3141 | if(type == CTRL_C_EVENT) |
| 3142 | { |
| 3143 | /* |
| 3144 | Do not shutdown before startup is finished and shutdown |
| 3145 | thread is initialized. Otherwise there is a race condition |
| 3146 | between main thread doing initialization and CTRL-C thread doing |
| 3147 | cleanup, which can result into crash. |
| 3148 | */ |
| 3149 | #ifndef EMBEDDED_LIBRARY |
| 3150 | if(hEventShutdown) |
| 3151 | kill_mysql(); |
| 3152 | else |
| 3153 | #endif |
| 3154 | sql_print_warning("CTRL-C ignored during startup"); |
| 3155 | DBUG_RETURN(TRUE); |
| 3156 | } |
| 3157 | #endif |
| 3158 | DBUG_RETURN(FALSE); |
| 3159 | } |
| 3160 | |
| 3161 | |
| 3162 |
nothing calls this directly
no test coverage detected