errno(6): No such device or address
is not handled in os.write
#18240
Labels
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
standard library
This issue involves writing Zig code for the standard library.
Milestone
Zig Version
0.12.0-dev.1808+69195d0cd
Steps to Reproduce and Observed Behaviour
I am writing to a device file. The device gets disconnected before or mid-flush. Such writes return
errno(6): No such device or address.
. This is expected behaviour.errno(6)
is defined inlinux/errno/generic.zig
:But it is not handled in
os.zig
:as it is not included as a variant of
os.WriteError
.Instead of handling the error silently, as the error is expected,
unexpectedErrno
is called, printing a stack trace in debug mode, i.e. filling stderr with unintended and uninformative noise.Expected Behavior
errno(6)
is handled silently, without the noisy call tounexpectedErrno(errno)
The text was updated successfully, but these errors were encountered: