Updates...

7 views
Skip to first unread message

Gene Buckle

unread,
Sep 18, 2025, 4:30:19 PM (13 days ago) Sep 18
to scarl...@googlegroups.com
The branch moving around is all done.  The 32 bit code has been moved to
master32 and Release32.

Ongoing work will be done in dev and merged into master as needed.

Got an interesting new issue by the author of a web server written in
QMBasic:

https://github.com/geneb/ScarletDME/issues/89

The tl;dr basically boils down to a crash that will happen when
WRITE.SOCKET() happens on a socket that has had the peer disconnect
either before or during the call.

The send() function behind WRITE.SOCKET() throws a SIGPIPE signal, which
brings the house down because there's no signal handler for that.

After doing some digging, I found that the correct method to avoid the
crash is to set the MSG_NOSIGNAL flag on the send() call.  However,
there's currently no mechanism available to set the flags that send()
uses.  Being able to add that flag will entail all kinds of
shenannigans, including writing a much better error handler that returns
meaningful information.  As it stands now, if the send() call fails (and
doesn't crash the process via SIGPIPE), it returns ER_FAILED for
*everything*.  According to the man page, send() has something 19
different error conditions... So, yeah. :)

It's been something like 15 years since I got deep into socket code, so
this should be fun. :)

g.


--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.

I'm not crazy, I'm plausibly off-nominal!

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
https://github.com/geneb/ScarletDME - Get it _today_!

Reply all
Reply to author
Forward
0 new messages