kopia lustrzana https://gitlab.com/sane-project/backends
Stop hp3500 backend from calling exit() at the end of a scan (which is
unhelpful when sane threads are threads rather than processes).merge-requests/1/head
rodzic
c2f0346983
commit
8ec394d648
|
@ -3392,11 +3392,11 @@ reader_process (void *pv)
|
||||||
sigset_t sigterm_set;
|
sigset_t sigterm_set;
|
||||||
struct SIGACTION act;
|
struct SIGACTION act;
|
||||||
struct hp3500_write_info winfo;
|
struct hp3500_write_info winfo;
|
||||||
|
int status;
|
||||||
|
|
||||||
if (sanei_thread_is_forked ())
|
if (sanei_thread_is_forked ())
|
||||||
{
|
{
|
||||||
close (scanner->pipe_r);
|
close (scanner->pipe_r);
|
||||||
}
|
|
||||||
|
|
||||||
sigfillset (&ignore_set);
|
sigfillset (&ignore_set);
|
||||||
sigdelset (&ignore_set, SIGTERM);
|
sigdelset (&ignore_set, SIGTERM);
|
||||||
|
@ -3413,6 +3413,7 @@ reader_process (void *pv)
|
||||||
act.sa_handler = sigtermHandler;
|
act.sa_handler = sigtermHandler;
|
||||||
#endif
|
#endif
|
||||||
sigaction (SIGTERM, &act, 0);
|
sigaction (SIGTERM, &act, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Warm up the lamp again if our last scan ended more than 5 minutes ago. */
|
/* Warm up the lamp again if our last scan ended more than 5 minutes ago. */
|
||||||
|
@ -3447,6 +3448,8 @@ reader_process (void *pv)
|
||||||
scanner->actres_pixels.bottom - scanner->actres_pixels.top,
|
scanner->actres_pixels.bottom - scanner->actres_pixels.top,
|
||||||
scanner->resolution, scanner->mode, (rts8801_callback) writefunc,
|
scanner->resolution, scanner->mode, (rts8801_callback) writefunc,
|
||||||
&winfo) >= 0)
|
&winfo) >= 0)
|
||||||
exit (SANE_STATUS_GOOD);
|
status = SANE_STATUS_GOOD;
|
||||||
exit (SANE_STATUS_IO_ERROR);
|
status = SANE_STATUS_IO_ERROR;
|
||||||
|
close (scanner->pipe_w);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue