Using the regular hello world example but giving it either a closed stdout fd or a read-only stdout fd it doesn't panic. Is this expected behavior?
niklas @ niklas-ThinkPad-T480s : ~/projects/rust-test/println-panic (master #)
$ strace -e write cargo -q run --release 1>&-; echo "Exit status" $?
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(5, "|", 1) = 1
write(1, "Hello, World!\n", 14) = -1 EBADF (Bad file descriptor)
+++ exited with 0 +++
Exit status 0
niklas @ niklas-ThinkPad-T480s : ~/projects/rust-test/println-panic (master #)
$ strace -e write cargo -q run --release 1</dev/null; echo "Exit status" $?
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(6, "|", 1) = 1
write(1, "Hello, World!\n", 14) = -1 EBADF (Bad file descriptor)
+++ exited with 0 +++
Exit status 0
Using the regular hello world example but giving it either a closed stdout fd or a read-only stdout fd it doesn't panic. Is this expected behavior?