tinit session timeout

How does tinit implement the -m option, that is, how does it know that a
session hasn’t had any input for so many minutes?

Kevin Miller <kevin.miller@transcore.com> wrote:

How does tinit implement the -m option, that is, how does it know that a
session hasn’t had any input for so many minutes?

At a guess, it uses dev_arm() to notice when characters appear on the
various different devices (for starting logins, shells, etc), and has
a timer, where it counts “idle” time for each device, and if the idle
time isn’t reset (because of a dev_arm() kick), then it issues the
SIGHUP.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com