diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 16:59:49 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 16:59:49 +0200 |
commit | 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (patch) | |
tree | d78102ce30207c63e7608eeba743efd680c888dc /backend/snapscan.c | |
parent | 58912f68c2489bcee787599837447e0d64dfd61a (diff) |
New upstream version 1.0.28upstream/1.0.28
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); |