On Mon, Dec 17, 2012 at 08:58:46PM +0100, Matthias Kilian wrote: > It would be nice if someone with a Linux machine around (and enough > spare time) could try changing the INIT_LOCK and INIT_UNLOCK macros > to error out on return values != 0 and check wether it still works > (it shouldn't -- it should fail).
Nobody did, so I did some testing this day, which only leads to frustration: - Per default, it *is* possible to unlock a mutex owned by another thread on Linux (undefined behaviour). - An attempt to use PTHREAD_MUTEX_ERRORCHECK (to get some comparable results on both OpenBSD and Linux) failed, because the linux machines i tried don't #define PTHREAD_MUTEX_ERRORCHECK if you #include <pthtread.h>. There were no manpages for pthread_mutexaatr_settype on the machines I tried. - A bug report to ettercap upstream (where I reported the problem and also mentioned that I'm not comfortable to the ettercap code and need support from those who are) had been closed with the comment "reopen when you have a patch". How nice. So if noone with some more Linux knowledge steps in, this port should be sent to the attic. Ciao, Kili