Skip to content

Commit b3d3b02

Browse files
committed
return size 0 for /dev/null read
1 parent 014f9d9 commit b3d3b02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub enum CmdIn {
1212
impl Read for CmdIn {
1313
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
1414
match self {
15-
CmdIn::CmdNull => Ok(buf.len()),
15+
CmdIn::CmdNull => Ok(0),
1616
CmdIn::CmdFile(file) => file.read(buf),
1717
CmdIn::CmdPipe(pipe) => pipe.read(buf),
1818
}

0 commit comments

Comments
 (0)