We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e170b9a commit cfa92dbCopy full SHA for cfa92db
1 file changed
src/uu/cat/src/splice.rs
@@ -34,9 +34,8 @@ pub(super) fn write_fast_using_splice<R: FdReadable, S: AsRawFd + AsFd>(
34
Err(_) => return Ok(true),
35
}
36
37
- } else {
+ } else if let Ok((pipe_rd, pipe_wr)) = pipe() {
38
// both of in/output are not pipe. needs broker to use splice() with additional costs
39
- let (pipe_rd, pipe_wr) = pipe()?;
40
loop {
41
match splice(&handle.reader, &pipe_wr, MAX_ROOTLESS_PIPE_SIZE) {
42
Ok(0) => return Ok(false),
@@ -54,6 +53,8 @@ pub(super) fn write_fast_using_splice<R: FdReadable, S: AsRawFd + AsFd>(
54
53
55
56
+ } else {
57
+ Ok(true)
58
59
60
0 commit comments