nix icon indicating copy to clipboard operation
nix copied to clipboard

Make `nix::sys::termios::Termios` implement `Sync` and `Copy`.

Open jimblandy opened this issue 3 years ago • 4 comments

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 avatar Oct 21 '20 05:10 jimblandy

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

jimblandy avatar Oct 21 '20 05:10 jimblandy

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 avatar Oct 21 '20 19:10 jimblandy

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

jimblandy avatar Nov 04 '20 06:11 jimblandy

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.

jimblandy avatar Nov 14 '20 22:11 jimblandy