Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 16edec3

Browse files
author
Stjepan Glavina
committed
Ignore seek errors in poll_unread
1 parent b3d30de commit 16edec3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/fs/file.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,10 @@ impl LockGuard<State> {
742742
if n > 0 {
743743
// Seek `n` bytes backwards. This call should not block because it only changes
744744
// the internal offset into the file and doesn't touch the actual file on disk.
745-
(&*self.file).seek(SeekFrom::Current(-(n as i64)))?;
745+
//
746+
// We ignore errors here because special files like `/dev/random` are not
747+
// seekable.
748+
let _ = (&*self.file).seek(SeekFrom::Current(-(n as i64)));
746749
}
747750

748751
// Switch to idle mode.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /