File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,10 +120,10 @@ pub fn exec(mut bytes: Vec<u8>) -> io::Result<()> {
120120 if let Ok ( ( p_read, mut p_write) ) = pipe :: < true > ( MAX_ROOTLESS_PIPE_SIZE )
121121 && p_write. write_all ( bytes) . is_ok ( )
122122 {
123+ // tee() cannot control offset. Check that output is pipe by tee
123124 if safe_partial_send && tee ( & p_read, & stdout, MAX_ROOTLESS_PIPE_SIZE ) . is_ok ( ) {
124- while let Ok ( 1 .. ) = tee ( & p_read, & stdout, MAX_ROOTLESS_PIPE_SIZE ) { }
125+ while tee ( & p_read, & stdout, MAX_ROOTLESS_PIPE_SIZE ) . is_ok ( ) { }
125126 } else if let Ok ( ( broker_read, broker_write) ) = pipe :: < true > ( MAX_ROOTLESS_PIPE_SIZE ) {
126- // tee() cannot control offset and write to non-pipe
127127 ' hybrid: while let Ok ( mut remain) = tee ( & p_read, & broker_write, MAX_ROOTLESS_PIPE_SIZE )
128128 {
129129 debug_assert ! ( remain == bytes. len( ) , "splice() should cleanup pipe" ) ;
You can’t perform that action at this time.
0 commit comments