ConsOpts
Defined in: packages/core/src/kernel/tty/cons.ts:47
Options bag for createConsFS.
Remarks
Section titled “Remarks”getTermSize is required — it is called every time a process reads
/dev/cons/size, so host resize events propagate naturally without
explicit notification. onSignal is optional and only fires when the
line discipline turns control keys (Ctrl-C, Ctrl-Z, etc.) into signals.
Properties
Section titled “Properties”getTermSize
Section titled “getTermSize”getTermSize: () =>
object
Defined in: packages/core/src/kernel/tty/cons.ts:53
Polled by /dev/cons/size on every read to emit ${cols} ${rows}\n.
Implementations should return the host terminal’s current dimensions.
Not cached — call cost is paid per read, so keep it cheap.
Returns
Section titled “Returns”object
cols:
number
rows:
number
onSignal?
Section titled “onSignal?”
optionalonSignal?: (sig,fgPgid?) =>void
Defined in: packages/core/src/kernel/tty/cons.ts:61
Invoked when the line discipline translates an input byte (e.g. Ctrl-C)
into a Signal. fgPgid is the latest value written via
setfg <pgid> through /dev/cons/ctl — undefined until the shell
posts one. Absent this callback, signals generated by the ldisc are
silently dropped.
Parameters
Section titled “Parameters”fgPgid?
Section titled “fgPgid?”number
Returns
Section titled “Returns”void