Skip to content

site: output buffering & flushing II#132

Merged
carloscortonc merged 3 commits intodevelopfrom
site/output-buffering-v2
Feb 1, 2026
Merged

site: output buffering & flushing II#132
carloscortonc merged 3 commits intodevelopfrom
site/output-buffering-v2

Conversation

@carloscortonc
Copy link
Owner

Simplifications of previous version (always writing output to files):

  • kernel now has a map of file descriptors
  • Each fd has a type (TTY/PIPE) and a buffer
  • process.stdout is sent to fd=1, process.stderr is sent to fd=2
  • A new FDStack keeps a stack for each kernel's fd. When output needs to be buffered (e.g. a quote containing command-sustitution echo "node-version=$(node -v)", a new fd of type PIPE is pushed into the stack
  • After each command, contents of fd=1 & fd=2 are flushed: if the fd's type is TTY, buffer is sent to renderer and then emptied

@carloscortonc carloscortonc merged commit a824f93 into develop Feb 1, 2026
4 checks passed
@carloscortonc carloscortonc deleted the site/output-buffering-v2 branch February 1, 2026 18:06
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 this pull request may close these issues.

1 participant

Comments