Describe the bug
If you have a process which outputs lots of logging on stdout and stderr, the nu docs say you could do "cmd out+err> [filename]" to pipe both into a file. This hangs and when you kill the process it ends up having around 64KB's of data in the output file flushed at the end, every time.
How to reproduce
- Create a program called
foo.c:
#include <stdio.h>
int main() {
// Should emit 1MiB on stderr
for (int i = 0; i < (1024 * 1024) / 16; i++) {
fprintf(stderr, "0123456789ABCDE\n");
}
}
- Compile with
gcc foo.c
- Run with
./a.out out+err> /tmp/foo.txt
- Observe that it hangs, exit and observe
/tmp/foo.txt filesize
- Run with
./a.out err> /tmp/foo.txt
- Observe that it doesn't hang and observe
/tmp/foo.txt filesize
Expected behavior
It shouldn't hang when mixing out+err> pipe form and should populate the file the same as in the err> pipe case.
Screenshots
No response
Configuration
| key |
value |
| version |
0.77.1 |
| branch |
|
| commit_hash |
0120e40 |
| build_os |
linux-x86_64 |
| build_target |
x86_64-unknown-linux-gnu |
| rust_version |
rustc 1.66.1 (90743e729 2023-01-10) |
| rust_channel |
1.66.1-x86_64-unknown-linux-gnu |
| cargo_version |
cargo 1.66.1 (ad779e08b 2023-01-10) |
| build_time |
2023-03-17 05:17:52 +00:00 |
| build_rust_channel |
release |
| features |
default, zip |
| installed_plugins |
|
Additional context
No response
Describe the bug
If you have a process which outputs lots of logging on stdout and stderr, the nu docs say you could do "cmd out+err> [filename]" to pipe both into a file. This hangs and when you kill the process it ends up having around 64KB's of data in the output file flushed at the end, every time.
How to reproduce
foo.c:gcc foo.c./a.out out+err> /tmp/foo.txt/tmp/foo.txtfilesize./a.out err> /tmp/foo.txt/tmp/foo.txtfilesizeExpected behavior
It shouldn't hang when mixing
out+err>pipe form and should populate the file the same as in theerr>pipe case.Screenshots
No response
Configuration
Additional context
No response