diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
commit | ee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch) | |
tree | 58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/snapscan.c | |
parent | 0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff) | |
parent | fef76e17ed4c607ea73b81279f9ef1d7121be900 (diff) |
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/snapscan.c')
-rw-r--r-- | backend/snapscan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/snapscan.c b/backend/snapscan.c index c88537b..b93f1f7 100644 --- a/backend/snapscan.c +++ b/backend/snapscan.c @@ -1286,7 +1286,7 @@ static SANE_Status start_reader (SnapScan_Scanner *pss) pss->nonblocking = SANE_FALSE; pss->rpipe[0] = pss->rpipe[1] = -1; - pss->child = -1; + sanei_thread_initialize (pss->child); if (pipe (pss->rpipe) != -1) { @@ -1812,7 +1812,7 @@ SANE_Status sane_read (SANE_Handle h, if (sanei_thread_is_valid (pss->child)) { sanei_thread_waitpid (pss->child, 0); /* ensure no zombies */ - pss->child = -1; + sanei_thread_invalidate (pss->child); } release_unit (pss); close_scanner (pss); @@ -1871,7 +1871,7 @@ void sane_cancel (SANE_Handle h) /* signal the reader, if any */ if (sanei_thread_is_valid (pss->child)) { - DBG( DL_INFO, ">>>>>>>> killing reader_process <<<<<<<<\n" ); + DBG( DL_INFO, "---- killing reader_process ----\n" ); sigemptyset(&(act.sa_mask)); act.sa_flags = 0; @@ -1904,7 +1904,7 @@ void sane_cancel (SANE_Handle h) sanei_thread_sendsig( pss->child, SIGKILL ); #endif } - pss->child = -1; + sanei_thread_invalidate( pss->child ); DBG( DL_INFO,"reader_process killed\n"); } release_unit (pss); |