+ /// Helper function that removes a `FileHandle` and allows to manipulate it using the `f`
+ /// closure. This function is quite useful when you need to modify a `FileHandle` but you need
+ /// to modify `MiriEvalContext` at the same time, so you can modify the handle and reinsert it
+ /// using `f`.
+ ///
+ /// If the `fd` file descriptor does not corresponds to a file, this functions returns `Ok(-1)`
+ /// and sets `Evaluator::last_error` to `libc::EBADF` (invalid file descriptor).
+ ///
+ /// This function uses `T: From<i32>` instead of `i32` directly because some IO related
+ /// functions return different integer types (like `read`, that returns an `i64`)