From a9341dfc235f20afb28a5d35d5b52925d8bbffd5 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Sun, 5 May 2002 22:07:57 +0000 Subject: [PATCH] Add an entry about the return value of wait/waitpid. Henning Meier-Geinitz --- TODO | 7 ++++++- doc/backend-writing.txt | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 0c87b02fd..16c378978 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -TODO (2002-04-23) +TODO (2002-05-05) ******** todo ******** @@ -76,6 +76,11 @@ backends "../../backend/coolscan-scsidef.h", line 160: warning: initialization type mismatch; empty declarations), see sane-devel. + * Check the return value of wait() and waitpid(). This is important, if + the status value is checked for e.g. WIFEXITED after the call of wait() + or waitpid(). Both functions may fail if the frontend already did a wait for + the children. + doc --- * Add doxygen documentation for the remaining sanei files: diff --git a/doc/backend-writing.txt b/doc/backend-writing.txt index cd1206d3a..dfa161fda 100644 --- a/doc/backend-writing.txt +++ b/doc/backend-writing.txt @@ -1,4 +1,4 @@ -2002-04-22 +2002-05-05 Here are a few rules and tips that should help writing a SANE-conformant backend and including it into the SANE package: @@ -140,6 +140,11 @@ PROGRAMMING * Don't use exit() in your backend. You will exit the whole program, not only your backend. +* If you use wait() or waitpid() in your backend, check its return value. This + is important, if the status value is checked for e.g. WIFEXITED after the + call of wait() or waitpid(). Both functions may fail if the frontend already + did a wait for the children. + * Please try to avoid compilation warnings. At least with "--disable-warnings" there shouldn't be warnings when compiling backends. It's not necessary to fix every "unused parameter" warning but take care that no warnings pointing