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

stdio::flush() does not work #6

Open
lasiotus opened this issue Jan 11, 2024 · 0 comments
Open

stdio::flush() does not work #6

lasiotus opened this issue Jan 11, 2024 · 0 comments

Comments

@lasiotus
Copy link
Member

At the moment, stdio::flush() in moto-runtime src/stdio.rs is a NOOP, which leads to delayed (or lost?) output when a process terminates. The tricky part is that stdin/out/err are implemented as pipes, and bytes move through them via relay threads, so flushing means some kind of cross-process synchronization, as this is all happening in userspace. Or maybe it is not really difficult, and just adding flush() to sync_pipe will work?

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

No branches or pull requests

1 participant