-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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
Metadata
Metadata
Assignees
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.