From 58912f68c2489bcee787599837447e0d64dfd61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 24 May 2017 21:03:56 +0200 Subject: New upstream version 1.0.27 --- backend/hp-handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/hp-handle.c') diff --git a/backend/hp-handle.c b/backend/hp-handle.c index d9be2d5..ec8adbc 100644 --- a/backend/hp-handle.c +++ b/backend/hp-handle.c @@ -192,7 +192,7 @@ hp_handle_startReader (HpHandle this, HpScsi scsi) this->pipe_write_fd = -1; } - if (this->reader_pid == -1) /* Creating child failed ? Clean up pipe */ + if (!sanei_thread_is_valid (this->reader_pid)) { if ( !this->child_forked ) { -- cgit v1.2.3 From 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 31 Jul 2019 16:59:49 +0200 Subject: New upstream version 1.0.28 --- backend/hp-handle.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'backend/hp-handle.c') 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); } } -- cgit v1.2.3