Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.Stdout.flush() ignores output errors rather than ensuring output buffers get written #59

Open
guenther-brunthaler opened this issue Dec 17, 2020 · 1 comment · May be fixed by #68
Open

Comments

@guenther-brunthaler
Copy link

The fflush() C API call in stdoutFlush(WrenVM*) should check the return code and throw an exception if it is nonzero.

In particular

$ cat test.wren 
import "io" for Stdout
System.write("Hello, world!\n")
Stdout.flush()

$ wren-cli test.wren > /dev/full ; echo "return code = $?"
return code = 0

There is currently no error message to indicate the output error, nor a failure return code.

@ruby0x1 ruby0x1 transferred this issue from wren-lang/wren Dec 17, 2020
@joshgoebel joshgoebel linked a pull request Apr 25, 2021 that will close this issue
@joshgoebel
Copy link
Contributor

@guenther-brunthaler Could you test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants