From a29e4952fbcb8d6944b577b215c47c02b0f0c90d Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 3 Aug 2020 16:03:54 -0700 Subject: [PATCH] Document use of mmap --- docs/api.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 735354f6..0c12932e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -51,6 +51,10 @@ Forking a child process to call ``ocrmypdf.ocr()`` is suggested. That way your application will survive and remain interactive even if OCRmyPDF does not. +Programs that call ``ocrmypdf.ocr()`` should also install a SIGBUS signal +handler (except on Windows), to raise an exception if access to a memory +mapped file fails. OCRmyPDF may use memory mapping. + .. warning:: On Windows, the script that calls ``ocrmypdf.ocr()`` must be protected