chiark / gitweb /
Only disable output on console during boot if needed
authorOlivier Brunel <jjk@jjacky.com>
Fri, 20 Sep 2013 20:18:29 +0000 (22:18 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Nov 2013 04:22:31 +0000 (23:22 -0500)
If there are no more jobs on console, no need/we shouldn't disable output.

src/core/manager.c
src/core/unit.c

index 07ca4c92f738fc6e6dd15975b15cf667050ed20e..c99a022cd5390ffc42d66848c223d3c4d6f0ab8a 100644 (file)
@@ -1789,7 +1789,7 @@ static int process_event(Manager *m, struct epoll_event *ev) {
         }
 
         case WATCH_IDLE_PIPE: {
         }
 
         case WATCH_IDLE_PIPE: {
-                m->no_console_output = true;
+                m->no_console_output = m->n_on_console > 0;
 
                 manager_unwatch_idle_pipe(m);
                 close_idle_pipe(m);
 
                 manager_unwatch_idle_pipe(m);
                 close_idle_pipe(m);
index 201329fc86811d5b5358ba281b399749822b8d61..15e0a820209e7b66a4f6c484aad21f26193957b7 100644 (file)
@@ -1492,7 +1492,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
 
                                 if (m->n_on_console == 0)
                                         /* unset no_console_output flag, since the console is free */
 
                                 if (m->n_on_console == 0)
                                         /* unset no_console_output flag, since the console is free */
-                                        m->no_console_output = 0;
+                                        m->no_console_output = false;
                         } else
                                 m->n_on_console ++;
                 }
                         } else
                                 m->n_on_console ++;
                 }