I'll admit I haven't considered Windows at all, it's not my main target.
On Unix, the protocol works like a charm. The sockets buffer the messages nicely, and make calls poll when needed, which is very cheap and atrociously standard.
As for security, the cookie was easy to create, so why not ? Real security is trivial on unix domain: the socket is chmod'd 0700 before even listening.
For TCP/IP the idea is to use it on a local build cluster, separated from the outside world.
If security from the outside is needed, there are usually other transport considerations, so some modicum of ipsec or other vpn technology is expected.
Ease of programming is something of a compromise: maybe on windows machine sockets will be hell to use, but the socket API is trivial and well supported anywhere else.
It will actually work in lots of places, including locations which do not have fully functional semaphore support !
I'll have a patch for ninja soon anyway. I could definitely fork the github repo.
As for the make patch, I'm OpenBSD's make maintainer. That patch contains two things:
- unoptimize some decisions that go in the way of dynamic job control (namely, remove an optimization for -j1 and make sure each Job structure is allocated separately)
- do the dynamic job control thingy.
The code design tries really hard not to depend on complicated external components. I just haven't had time to test it with ninja.
As for the POC server, I haven't tried building it elsewhere yet. The only parts that will probably break (a bit) are the
use of recallocarray and arc4random_buf. Compiling it in C++ mode will require a few casts (but then the growable arrays would
probably best suited as vectors, obviously).