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

Added LOCAL_PEERPID/LocalPeerPid sockopt for macos #1967

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

mitsuhiko
Copy link
Contributor

@mitsuhiko mitsuhiko commented Jan 11, 2023

macOS has a badly documented LOCAL_PEERPID sockopt that can be used to retrieve the PID of the connected peer.

I intentionally only added this for macOS because I know it exists there, and I'm not sure about ios yet even if it exists there, it's doubtful that the PID information gets any use there.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a test? It also needs a changelog entry.

@mitsuhiko
Copy link
Contributor Author

@asomers absolutely. I added a test and changelog entry.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be enabled for iOS too?

@mitsuhiko
Copy link
Contributor Author

I added ios to the conditional compilation and seems like the tests pass.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit c42b649 into nix-rust:master Feb 9, 2023
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.

None yet

2 participants