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

Make nix::sys::termios::Termios implement Sync and Copy. #1324

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

Conversation

jimblandy
Copy link

It's kind of tough that Termios doesn't implement Sync, because then you
can't use them with the signal_hook crate's register function, or any other
signal-handling wrapper that tries to be safe.

This approach probably entails a bit more copying bits around, but I'd argue the
convenience of Sync and Copy implementations is worth it.

@jimblandy
Copy link
Author

(I tried to fix the cfg-ed out code, too, but if I got it all right I'll be surprised...)

@jimblandy
Copy link
Author

Yeah, I missed a case, and that's causing the FreeBSD failure.

The test-aio-drop failures don't seem to have anything to do with this push.

@jimblandy
Copy link
Author

@asomers: It doesn't seem like @Susurrus is available; is there anyone else who can review?

src/sys/termios.rs Outdated Show resolved Hide resolved
It's kind of tough that `Termios` doesn't implement `Sync`, because then you
can't use them with the `signal_hook` crate's `register` function, or any other
signal-handling wrapper that tries to be safe.

This approach probably entails a bit more copying bits around, but I'd argue the
convenience of `Sync` and `Copy` implementations is worth it.
@jimblandy
Copy link
Author

The CI failure is due to libc's deprecation of the af_alg_iv struct:

error: use of deprecated struct `libc::af_alg_iv`: this struct has unsafe trait implementations that will be removed in the future

This could be addressed by either #1329 or #1285.

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