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
Name Last commit Last update
..
chat
ctrl
dosxtrn
gtkchat
gtkmonitor
gtkuseredit
gtkuserlist
menuedit
scfg
syncview
uedit
umonitor
useredit
userlist
.gitignore
CMakeLists.txt
Common.gmake
Common.make
GNUmakefile
MSG00001.bin
addfiles.c
addfiles.vcxproj
ans2asc.c
ans2asc.vcxproj
ansiterm.cpp
answer.cpp
ars.c
ars_defs.h
asc2ans.c
asc2ans.vcxproj
atcodes.cpp
baja.c
baja.vcxproj
bat_xfer.cpp
build.bat
bulkmail.cpp
chat.cpp
chk_ar.cpp
chksmb.c
chksmb.vcxproj
clean.bat
client.h
cmdshell.h
con_hi.cpp
con_out.cpp
dat_rec.c
dat_rec.h
data.cpp
data_ovl.cpp
date_str.c
date_str.h
delfiles.c
delfiles.vcxproj
dllexport.h
download.cpp
dupefind.c
dupefind.vcxproj
echocfg.c
echocfg.vcxproj
email.cpp
exec.cpp
execfile.cpp
execfunc.cpp
execmisc.cpp
execmsg.cpp
execnet.cpp
extdeps.mk
fastcgi.h
fido.cpp
fidodefs.h
file.cpp
filedat.c
filedat.h
filelist.c
filelist.vcxproj
finddupes.c
findstr.c
findstr.h
fixsmb.c
fixsmb.vcxproj
fmsgdump.c
fmsgdump.vcxproj
fossdefs.h
fossinfo.c
ftpsrvr.c
ftpsrvr.h
ftpsrvr.vcxproj
getctrl.c
getctrl.h
getkey.cpp
getmail.c
getmail.h
getmsg.cpp
getnode.cpp
getstats.c
getstats.h
getstr.cpp
gtkconvert.pl
htmlansi.h
ident.c
ident.h
inkey.cpp
js_archive.c
js_bbs.cpp
js_cache.h
js_client.c
js_com.c
js_conio.c
js_console.cpp
js_cryptcert.c
js_cryptcert.h
js_cryptcon.c
js_cryptcon.h
js_cryptkeyset.c
js_file.c
js_file_area.c
js_filebase.c
js_global.c
js_internal.c
js_mqtt.c
js_msg_area.c
js_msgbase.c
js_queue.c
js_request.c
js_request.h
js_rtpool.c
js_rtpool.h
js_server.c
js_socket.c
js_socket.h
js_sprintf.c
js_system.c
js_uifc.c
js_user.c
js_xtrn_area.c
jsdebug.c
jsdebug.h
jsdoor.c
jsexec.c
jsexec.vcxproj
listfile.cpp
load_cfg.c
load_cfg.h
load_cfg.vcxproj
logfile.cpp
login.cpp
logon.cpp
logout.cpp
mail.cpp
mailsrvr.c
mailsrvr.h
mailsrvr.vcxproj
main.cpp
makeuser.c
makeuser.vcxproj
makevdd.bat
mime.c
mime.h
mqtt.c
mqtt.h
msdirent.c
msdirent.h
msg_id.c
msg_id.h
msgdate.c
msgdate.h
msgtoqwk.cpp
mxlookup.c
netmail.cpp
newuser.cpp
node.c
node.vcxproj
nodedefs.h
nopen.c
nopen.h
ntsvcs.c
ntsvcs.h
ntsvcs.mc
ntsvcs.rc
ntsvcs.vcxproj
objects.mk
pack_qwk.cpp
pack_rep.cpp
pcbdefs.hpp
pktdump.c
pktdump.vcxproj
postmsg.cpp
prntfile.cpp
putmsg.cpp
putnode.cpp
qbbsdefs.hpp
qwk.cpp
qwk.h
qwknodes.c
qwknodes.vcxproj
qwktomsg.cpp
readmail.cpp
readmsgs.cpp
readsauce.c
readtext.c