mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 23:49:06 +08:00
Replace TessBaseAPI::CatchSignals by a dummy function
That function is now a dummy which just exists to be API compatible. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
cf512d3804
commit
9a5f72479a
@ -254,22 +254,12 @@ size_t TessBaseAPI::getOpenCLDevice(void **data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the thresholded image to stderr as a PBM file on receipt of a
|
||||
* SIGSEGV, SIGFPE, or SIGBUS signal. (Linux/Unix only).
|
||||
* This method used to write the thresholded image to stderr as a PBM file
|
||||
* on receipt of a SIGSEGV, SIGFPE, or SIGBUS signal. (Linux/Unix only).
|
||||
*/
|
||||
void TessBaseAPI::CatchSignals() {
|
||||
#ifdef __linux__
|
||||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(action));
|
||||
action.sa_handler = &signal_exit;
|
||||
action.sa_flags = SA_RESETHAND;
|
||||
sigaction(SIGSEGV, &action, nullptr);
|
||||
sigaction(SIGFPE, &action, nullptr);
|
||||
sigaction(SIGBUS, &action, nullptr);
|
||||
#else
|
||||
// Warn API users that an implementation is needed.
|
||||
tprintf("CatchSignals has no non-linux implementation!\n");
|
||||
#endif
|
||||
tprintf("Deprecated method CatchSignals has only a dummy implementation!\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user