Open wilhelmy opened 1 year ago
I guess this code could be removed. It might also not work on other BSD derivatives, but it seems no one has tried. It's the only place in the codebase that uses the
__FreeBSD__
macro and fchmod on sockets that don't exist in the file system is probably not quite portable. Removing the code actually shouldn't add a race condition because although we're calling bind, since notion isn't multithreaded there is nothing actually reading from the socket before the function returns, so I think I'd rather remove it.
If you're confident, then I'd be happy to merge a PR just removing it (perhaps adding a comment with the background, for the unlikely case we'd ever add multithreading here)?
I guess this code could be removed. It might also not work on other BSD derivatives, but it seems no one has tried. It's the only place in the codebase that uses the
__FreeBSD__
macro and fchmod on sockets that don't exist in the file system is probably not quite portable. Removing the code actually shouldn't add a race condition because although we're calling bind, since notion isn't multithreaded there is nothing actually reading from the socket before the function returns, so I think I'd rather remove it.