Skip to content
Snippets Groups Projects
Deucе's avatar
Deucе authored
This should fix the sftp hangs...
While FreeBSD will return EDEADLOCK when a mutex would deadlock,
Linux will do what I ask and deadlock.

Since we're not checking the return value of pthread_mutex_lock(),
this would go completely unnoticed on FreeBSD, resulting in the
mutex being unlocked early and all sorts of unprotected accesses
would happen, potentially doing crazy things.  On Linux it just
deadlocks, and taking a peek at the thread backtraces makes the
problem obvious.

So, point to Linux for making life more correct for people who
do incorrect things (locking without checking the return value).

I'd also like to thank nelgin, for sticking with me on this issue
and being my gdb puppet.

And really, this commit should be shared by all the contributors
who... 𝆺𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆹𝅥𝅯
3bd80d0e
History

Synchronet Project

BBS-Related Software Source Repository

Directories within:

  • 3rdp - Third-party libraries
  • ctrl - Synchronet BBS configuration and run-time data files
  • docs - Synchronet BBS documentation (mostly legacy HTML)
  • exec - Synchronet BBS executable files (mostly JavaScript)
  • install - Synchronet BBS installation files
  • node1 - Synchronet BBS Terminal Server "node" configuration files
  • src - Source code (mostly C/C++)
  • text - Synchronet BBS text and menu files
  • web - Synchronet Legacy/Runemaster web UI
  • webv4 - echicken's web interface (v4) for Synchronet
  • xtrn - Synchronet BBS doors (mostly JavaScript)

Related web-sites:
Synchronet BBS Software
Synchronet Wiki
Synchronet Source Repository