summaryrefslogtreecommitdiff
path: root/backend/hp-handle.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
commit3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (patch)
treed69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/hp-handle.c
parentc8bd2513ecba169cff44c09c8058c36987357b18 (diff)
parent1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff)
Update upstream source from tag 'upstream/1.0.28'
Update to upstream version '1.0.28' with Debian dir ec5bb298266630fc3801ff6dc0c258f6df7ba979
Diffstat (limited to 'backend/hp-handle.c')
-rw-r--r--backend/hp-handle.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/backend/hp-handle.c b/backend/hp-handle.c
index ec8adbc..63e9fcb 100644
--- a/backend/hp-handle.c
+++ b/backend/hp-handle.c
@@ -227,16 +227,9 @@ hp_handle_stopScan (HpHandle this)
{
int info;
DBG(3, "hp_handle_stopScan: killing child (%ld)\n", (long) this->reader_pid);
- if (this->child_forked)
- {
- kill(this->reader_pid, SIGTERM);
- waitpid(this->reader_pid, &info, 0);
- }
- else
- {
- sanei_thread_kill (this->reader_pid);
- sanei_thread_waitpid(this->reader_pid, &info);
- }
+ sanei_thread_kill (this->reader_pid);
+ sanei_thread_waitpid(this->reader_pid, &info);
+
DBG(1, "hp_handle_stopScan: child %s = %d\n",
WIFEXITED(info) ? "exited, status" : "signalled, signal",
WIFEXITED(info) ? WEXITSTATUS(info) : WTERMSIG(info));
@@ -746,10 +739,7 @@ sanei_hp_handle_cancel (HpHandle this)
{
DBG(3,"sanei_hp_handle_cancel: send SIGTERM to child (%ld)\n",
(long) this->reader_pid);
- if (this->child_forked)
- kill(this->reader_pid, SIGTERM);
- else
- sanei_thread_kill(this->reader_pid);
+ sanei_thread_kill(this->reader_pid);
}
}