1
0
Fork 0
forked from wry/wry

tests: fix ol' forker dumping core in tests

This commit is contained in:
Julian Orth 2022-05-13 19:26:55 +02:00
parent 3bd1813d50
commit 22b7fb2ced
5 changed files with 34 additions and 6 deletions

View file

@ -7,6 +7,7 @@ use {
utils::errorfmt::ErrorFmt,
},
std::cell::Cell,
uapi::c,
};
pub struct AsyncCancelTask {
@ -36,7 +37,9 @@ unsafe impl Task for AsyncCancelTask {
fn complete(self: Box<Self>, ring: &IoUringData, res: i32) {
if let Err(e) = map_err!(res) {
log::debug!("Could not cancel task: {}", ErrorFmt(e));
if e.0 != c::ENOENT {
log::debug!("Could not cancel task: {}", ErrorFmt(e));
}
}
ring.cached_cancels.push(self);
}