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

Redirection of stdout #276

Open
edubart opened this issue Oct 3, 2024 · 0 comments
Open

Redirection of stdout #276

edubart opened this issue Oct 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@edubart
Copy link
Contributor

edubart commented Oct 3, 2024

Context

For some use cases is useful to to spawn multiple machines in different threads and yet still be able to capture stdout for each machine separately. We need to find a way to do this changing at runtime how os_putchar behaves.

Possible solutions

There are a couple of ways of doing this:

  1. A callback (kinda unsafe and harder to use when binding to other languages)
  2. A machine run interruption with a new break reason with some buffering (perhaps the best option, more elaborate to do it)
  3. A runtime option to set the file descriptor number os_putchar uses (easy/quick to do, not that cross platform, still need to create FD for each machine)

We are inclined to support option 2.

@edubart edubart added the enhancement New feature or request label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant