chiark / gitweb /
terminal-util: rework acquire_terminal()
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Feb 2018 20:24:37 +0000 (21:24 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:55 +0000 (07:58 +0200)
commita7a146bb7e5502c491055687248d914a9c1f8125
treecccd21d229b54f7889a9f4e93ebfc7810783b396
parent3033a1dcaba3ee6afa77c56f6e764489e6eafc4d
terminal-util: rework acquire_terminal()

This modernizes acquire_terminal() in a couple of ways:

1. The three boolean arguments are replaced by a flags parameter, that
   should be more descriptive in what it does.

2. We now properly handle inotify queue overruns

3. We use _cleanup_ for closing the fds now, to shorten the code quite a
   bit.

Behaviour should not be altered by this.
src/basic/terminal-util.c
src/basic/terminal-util.h