Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_notionflux: Add ifdef for fchmod on FreeBSD (closes #350) #355

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wilhelmy
Copy link
Collaborator

No description provided.

@wilhelmy
Copy link
Collaborator Author

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.

@raboof
Copy link
Owner

raboof commented Feb 25, 2023

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants