signals.c (215187) | signals.c (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file signals.c 4/// \brief Handling signals to abort operation 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 165 unchanged lines hidden (view full) --- 174// handler). Instead, we use SetConsoleCtrlHandler() to catch user 175// pressing C-c, because that seems to be the recommended way to do it. 176// 177// NOTE: This doesn't work under MSYS. Trying with SIGINT doesn't work 178// either even if it appeared to work at first. So test using Windows 179// console window. 180 181static BOOL WINAPI | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file signals.c 4/// \brief Handling signals to abort operation 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 165 unchanged lines hidden (view full) --- 174// handler). Instead, we use SetConsoleCtrlHandler() to catch user 175// pressing C-c, because that seems to be the recommended way to do it. 176// 177// NOTE: This doesn't work under MSYS. Trying with SIGINT doesn't work 178// either even if it appeared to work at first. So test using Windows 179// console window. 180 181static BOOL WINAPI |
182signal_handler(DWORD type lzma_attribute((unused))) | 182signal_handler(DWORD type lzma_attribute((__unused__))) |
183{ 184 // Since we don't get a signal number which we could raise() at 185 // signals_exit() like on POSIX, just set the exit status to 186 // indicate an error, so that we cannot return with zero exit status. 187 set_exit_status(E_ERROR); 188 user_abort = true; 189 return TRUE; 190} --- 12 unchanged lines hidden --- | 183{ 184 // Since we don't get a signal number which we could raise() at 185 // signals_exit() like on POSIX, just set the exit status to 186 // indicate an error, so that we cannot return with zero exit status. 187 set_exit_status(E_ERROR); 188 user_abort = true; 189 return TRUE; 190} --- 12 unchanged lines hidden --- |