Skip to main content

setupStreams

Initializes and configures standard I/O streams by creating new TTY devices and re-linking stdin, stdout, and stderr to them. This function performs file system modifications including unlinking existing device nodes, creating symbolic links, and resetting stream file descriptors.

def setupStreams(
FS: object,
TTY: object
) - > null

Initializes and reconfigures the standard I/O streams by creating new TTY devices and symlinking them to stdin, stdout, and stderr. This function ensures that the file system's standard streams are mapped to specific virtual terminal devices for consistent input/output handling.

Parameters

NameTypeDescription
FSobjectThe file system interface used to create devices, manage symlinks, and open or close file streams.
TTYobjectThe terminal driver interface used to register new TTY device identifiers with operational logic.

Returns

TypeDescription
nullNothing is returned; the function modifies the global file system state and stream mappings.