Skip to content

Commit 61bd3e2

Browse files
committed
Added LOCAL_PEERPID/LocalPeerPid sockopt for macos
1 parent c5d6732 commit 61bd3e2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sys/socket/sockopt.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,15 @@ sockopt_impl!(
492492
libc::LOCAL_PEERCRED,
493493
super::XuCred
494494
);
495+
#[cfg(any(target_os = "macos"))]
496+
sockopt_impl!(
497+
/// Get the PID of the peer process of a connected unix domain socket.
498+
LocalPeerPid,
499+
GetOnly,
500+
0,
501+
libc::LOCAL_PEERPID,
502+
libc::c_int
503+
);
495504
#[cfg(any(target_os = "android", target_os = "linux"))]
496505
sockopt_impl!(
497506
/// Return the credentials of the foreign process connected to this socket.

0 commit comments

Comments
 (0)