diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:58 +0200 |
commit | d087d778ffb62e2713cb848540bcc819470365bd (patch) | |
tree | d69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/snapscan.c | |
parent | c8bd2513ecba169cff44c09c8058c36987357b18 (diff) | |
parent | 3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (diff) |
Merge branch 'feature/upstream' into develop
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); |