mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-12 23:15:03 +07:00
systemctl: cache tty value before we open the pager
This commit is contained in:
parent
abca482291
commit
3b0727f5ec
@ -122,11 +122,6 @@ static pid_t agent_pid = 0;
|
||||
|
||||
static int daemon_reload(DBusConnection *bus, char **args, unsigned n);
|
||||
|
||||
static void pager_open_if_enabled(void) {
|
||||
if (!arg_no_pager)
|
||||
pager_open();
|
||||
}
|
||||
|
||||
static bool on_tty(void) {
|
||||
static int t = -1;
|
||||
|
||||
@ -142,6 +137,13 @@ static bool on_tty(void) {
|
||||
return t;
|
||||
}
|
||||
|
||||
static void pager_open_if_enabled(void) {
|
||||
on_tty();
|
||||
|
||||
if (!arg_no_pager)
|
||||
pager_open();
|
||||
}
|
||||
|
||||
static void spawn_ask_password_agent(void) {
|
||||
pid_t parent;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user