Safari 16.6 on macOS 13.7.8 opens connections to the page server that it
sends no request on, and keeps one open for about 30 s. webgl-serve.pl read
its connections one at a time, so it waited on such a connection while the
page's own requests, its result among them, queued behind it. In a 13.7.8
guest, a page server of this kind held a connection of WebKit's Networking
process with no request on it, while eight more connections had their
requests waiting unread (netstat, lsof: m3-max-15745). A curl of the server
from the guest's shell timed out, and every queued request was answered once
Safari quit.
The gate's webgl phase on 13.7.8 took 35 s with this server, against a 60 s
limit, and 6 s with the new one, both passing (m3-max-15757). The appwalk
harness's page server, which reads its connections the same way, waits 20 s
for the result and reported none. 11.7.11 and 12.7.6 (Safari 14.1.3 and
15.6.1) passed the same check.
Each connection now gets a child of its own. The first child that brings a
result writes it under another name, links it to RESULT and tells the parent,
which ends the children still open and exits 0. The timeout still exits 1.