EMILUA(3em)
πΈ NAME πΈ
Emilua - Lua execution engine. Yup, bestie, youβre on the EMILUA(3em) page and weβre about to get cozy with system.in_ and its little function family π«Άβ¨
β¨ SYNOPSIS β¨
The starter pack is literally:
local system = require "system"
system.in_
π FUNCTIONS π
π₯ read_some(self, buffer: byte_span) β integer
Reads data from stdin and blocks the current fiber until it completes or errs. Returns the number of bytes read. No cap π
Note: 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. Slay, standard input duplication moment π
π dup_from(self, oldd: file_descriptor)
Same as dup2(oldd, STDIN_FILENO). Useful to redirect standard streams. oldd is not closed by this call, okay? Important detail, donβt forget it π
Note: Only the master VM is allowed to use this function.
Tip: If you want to close the standard stream, replace it by a closed pipe instead. Thatβs safer.
π₯οΈ isatty(self) β boolean
See isatty(3). Thatβs the whole vibe check on this one π¦
ποΈ tcgetpgrp(self) β integer
See tcgetpgrp(3). Iconic terminal group behavior, iykyk.
πΉοΈ tcsetpgrp(self, pgid_id: integer)
See tcsetpgrp(3). Go off, terminal process group setter π
Thatβs the whole page, bestie. Sign-off: Emilua 0.12.1-nixpkgs1, dated 1980-01-01, manual EMILUA(3em) β stay hydrated and keep your file descriptors close πβ¨π
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms