-
Notifications
You must be signed in to change notification settings - Fork 703
Closed
Description
Lines 103 to 105 in b2e45a9
pub fn set_mask(&mut self, mask: &SigSet) -> Result<()> { | |
_signalfd(Some(self.0.as_fd()), mask, SfdFlags::empty()).map(drop) | |
} |
This is because _signalfd
returns an OwnedFd
as of #1874 (cc @JonathanWoollett-Light ):
Line 52 in b2e45a9
fn _signalfd<F: AsFd>(fd: Option<F>, mask: &SigSet, flags: SfdFlags) -> Result<OwnedFd> { |
This has caused issues in Smithay/calloop, and required backing out of the nix 0.27 update (+ #2112, of course).
This can be worked around in user code by using the newly-deprecated signalfd
function, so it's not too bad:
- file.set_mask(&mask)?;
+ // The nix crate is currently broken. We would like to use:
+ // file.set_mask(&mask)?;
+ // but this closes the file descriptor
+ #[allow(deprecated)]
+ signalfd::signalfd(Some(file.as_fd()), &mask, SfdFlags::empty())
+ .map(std::mem::forget)?;
Metadata
Metadata
Assignees
Labels
No labels