chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abca482
)
systemctl: cache tty value before we open the pager
author
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Jul 2011 01:30:31 +0000
(
03:30
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Jul 2011 01:30:31 +0000
(
03:30
+0200)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 556070bcbaa688b6d3b92a2d6d65185b89895241..6b4f9810618ebd428a726022e0bd5bac07721093 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-122,11
+122,6
@@
static pid_t agent_pid = 0;
static int daemon_reload(DBusConnection *bus, char **args, unsigned n);
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;
static bool on_tty(void) {
static int t = -1;
@@
-142,6
+137,13
@@
static bool on_tty(void) {
return t;
}
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;
static void spawn_ask_password_agent(void) {
pid_t parent;