system.in_

Synopsis

local system = require "system"
system.in_

Functions

read_some(self, buffer: byte_span) → integer

Read data from stdin and blocks current fiber until it completes or errs.

Returns the number of bytes read.

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 STDIN_FILENO.

dup_from(self, oldd: file_descriptor)

Same as dup2(oldd, STDIN_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).