Skip to content

Redirection of stdout #276

@edubart

Description

@edubart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions