class Termisu::TerminalOwnership

Overview

Process-global ownership guard for the controlling terminal.

A process has one controlling terminal and Termisu also installs a global SIGWINCH handler and logging backend. Letting two instances manage those resources independently makes either instance's shutdown corrupt the other.

Defined in:

termisu/terminal_ownership.cr

Constructors

Instance Method Summary

Constructor Detail

def self.acquire : self #

[View source]

Instance Method Detail

def release : Nil #

Releases this lease at most once. In particular, a repeated close on an old instance cannot release the lease subsequently acquired by a new instance.


[View source]