summaryrefslogtreecommitdiff
path: root/backend/test.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
commit324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch)
treebd2d48a139bfbe869f4f49359b63097931a45e7b /backend/test.c
parent2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff)
parent1edb02101a9306fc711cd422ed507d18165b1691 (diff)
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'backend/test.c')
-rw-r--r--backend/test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/test.c b/backend/test.c
index d5b7365..2ca5b3b 100644
--- a/backend/test.c
+++ b/backend/test.c
@@ -1355,7 +1355,7 @@ finish_pass (Test_Device * test_device)
DBG (2, "finish_pass: pipe closed\n");
test_device->pipe = -1;
}
- if (test_device->reader_pid != -1)
+ if (sanei_thread_is_valid (test_device->reader_pid))
{
int status;
SANE_Pid pid;
@@ -1364,7 +1364,7 @@ finish_pass (Test_Device * test_device)
(long) test_device->reader_pid);
sanei_thread_kill (test_device->reader_pid);
pid = sanei_thread_waitpid (test_device->reader_pid, &status);
- if (pid == -1)
+ if (!sanei_thread_is_valid (pid))
{
DBG (1,
"finish_pass: sanei_thread_waitpid failed, already terminated? (%s)\n",
@@ -2568,7 +2568,7 @@ sane_start (SANE_Handle handle)
test_device->reader_pid =
sanei_thread_begin (reader_task, (void *) test_device);
- if (test_device->reader_pid == -1)
+ if (!sanei_thread_is_valid (test_device->reader_pid))
{
DBG (1, "sane_start: sanei_thread_begin failed (%s)\n",
strerror (errno));