system.out

Synopsis

local system = require "system"
system.out

Functions

write_some(self, buffer: byte_span) → integer

Write data to stdout and blocks current fiber until it completes or errs.

Returns the number of bytes written.

First argument is ignored and it’s only there to make it have a stream-like interface.

dup(self) → file_descriptor

Creates a new file descriptor that refers to STDOUT_FILENO.

dup_from(self, oldd: file_descriptor)

Same as dup2(oldd, STDOUT_FILENO). Useful to redirect standard streams.

oldd is not closed by this call.

Only the master VM is allowed to use this function.
If you want to close the standard stream, replace it by a closed pipe instead. That’s safer.

isatty(self) → boolean

See isatty(3).

tcgetpgrp(self) → integer

See tcgetpgrp(3).

tcsetpgrp(self, pgid_id: integer)

See tcsetpgrp(3).