Moved from the Bug reports because this is more an architecture and design
issue.

Bugs item #1650477, was opened at 2007-02-02 11:30
Submitted By: Markus Elfring (elfring)
Summary: Check return codes everywhere

Comment By: Markus Elfring (elfring)
Date: 2007-02-27 15:53

I am a bit concerned about program corretness. I imagine that failed log
messages can matter.
Would you like to achieve complete and correct error handling?

----------------------------------------------------------------------

> Submitted By: Markus Elfring (elfring)
>
> Initial Comment:
> Some checks for return codes are missing.
>
> Examples:
> 1. Would you like to add more error handling for return values from "fputs"
> like in the function "err_msg"?
>
> http://owfs.cvs.sourceforge.net/owfs/owfs/module/owlib/src/c/error.c?revision=1.12&view=markup
>
> 2. How do you think to add safety checks for the calls of
> "pthread_mutex_..." in your "..._r" functions?
>
> http://owfs.cvs.sourceforge.net/owfs/owfs/module/owlib/src/c/getaddrinfo.c?revision=1.8&view=markup
>
> ----------------------------------------------------------------------
>
> Comment By: Christian Magnusson (d1mag)
> Date: 2007-02-27 15:22
>
>
>> All thread-locks are currently done without error checking. It would
>> require tons of changes and the calls are not likely to fail.
>> error-handling in the error-print-function is a bit unnecessary.
>>
>> ----------------------------------------------------------------------
>>
>
> Comment By: Markus Elfring (elfring)
> Date: 2008-07-01 09:54
>
> Would you like to look at the opinions from the discussion on the issue
> "PTHREAD_MUTEX_INITIALIZER"?
> http://groups.google.de/group/comp.programming.threads/msg/6c58abccbf1d19c2
>
> ----------------------------------------------------------------------
>


> Comment By: Paul Alfille (alfille)
> Date: 2008-07-01 16:31
>
> I've looked at the documentation for pthread_mutex_lock/unlock
> http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_mutex_lock.html
>
> Most of the error codes are relevant to rcursive or error mutexes. For
> "normal" static mutexes, either you get a deadlock or it works. The
> deadlocks get figured out early in development.
>
> With our locking wrapped in macros, the error handling would be an abort
> in any case.
>
> ----------------------------------------------------------------------
>
>
> >Comment By: Markus Elfring (elfring)
> Date: 2008-07-01 16:49
>
> How do you think about a cooperation with the function
> "
> http://opengroup.org/onlinepubs/009695399/functions/pthread_cleanup_push.html
> "?
>
> Would you like to reduce the efforts for error code checking by an
> exception class hierarchy?
> http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
> http://cexcept.sourceforge.net/
>
> ----------------------------------------------------------------------
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to