ttrpc-rust
ttrpc-rust copied to clipboard
Make the difference between cfg(target_os = "macos") and cfg(not(target_os = "linux")) clearer
There are two types of checking different OSs:
https://github.com/containerd/ttrpc-rust/blob/212d2211d3da7769a3b2bb5ee2f59db802cfb3a3/src/sync/server.rs#L335-L341
https://github.com/containerd/ttrpc-rust/blob/dfae1ad06ec29d93ed76dfcf3e931168cd1d426a/src/common.rs#L120-L123
Should these use the consistent way, for example, the pairs of:
- target_os = "linux" and target_os = "macos"
- target_os = "linux" and not(target_os = "linux")
I think this partially intersects with https://github.com/containerd/ttrpc-rust/issues/132
SOCK_CLOEXEC fix applicable to both windows and mac os, so it make sense to use not(linux) or any(windows, macos).