chiark / gitweb /
manager: dump status on SIGUSR1
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:54:57 +0000 (21:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:54:57 +0000 (21:54 +0200)
manager.c

index 234fb93..4cfa6b9 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -1502,6 +1502,16 @@ static int manager_process_signal_fd(Manager *m, bool *quit) {
 
                         break;
 
+                case SIGUSR1:
+
+                        printf("→ By units:\n");
+                        manager_dump_units(m, stdout, "\t");
+
+                        printf("→ By jobs:\n");
+                        manager_dump_jobs(m, stdout, "\t");
+
+                        break;
+
                 default:
                         log_info("Got unhandled signal <%s>.", strsignal(sfsi.ssi_signo));
                 }