mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-13 07:59:04 +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
|
* This method used to write the thresholded image to stderr as a PBM file
|
||||||
* SIGSEGV, SIGFPE, or SIGBUS signal. (Linux/Unix only).
|
* on receipt of a SIGSEGV, SIGFPE, or SIGBUS signal. (Linux/Unix only).
|
||||||
*/
|
*/
|
||||||
void TessBaseAPI::CatchSignals() {
|
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.
|
// Warn API users that an implementation is needed.
|
||||||
tprintf("CatchSignals has no non-linux implementation!\n");
|
tprintf("Deprecated method CatchSignals has only a dummy implementation!\n");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user