ttyslot function
Return the index into the active-logins file (utmp) for the controlling terminal.
Implementation
int ttyslot() {
_ttyslot ??= Libc()
.dylib
.lookupFunction<ffi.Int32 Function(), _dart_ttyslot>('ttyslot');
return _ttyslot!();
}