diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-02-24 18:58:15 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-03-08 13:42:46 -0500 |
commit | 71cd2f7ce705561d8d8f3cb7f385a57bedad1ef1 (patch) | |
tree | 3d8e723c7deedc04468e4e0a1a52b60c0d0b302e /src/monitor/monitor_sbus.c | |
parent | bc7d61995ed04de885cb8e4bf4c5f2dcbc780649 (diff) | |
download | sssd-71cd2f7ce705561d8d8f3cb7f385a57bedad1ef1.tar.gz sssd-71cd2f7ce705561d8d8f3cb7f385a57bedad1ef1.tar.xz sssd-71cd2f7ce705561d8d8f3cb7f385a57bedad1ef1.zip |
Reopen logs when SIGHUP is caught
Upon receiving SIGHUP, the monitor signals all services to reopen their
debug logs. It is also possible to signal individual services to reopen
their particular files.
Fixes: #332
Diffstat (limited to 'src/monitor/monitor_sbus.c')
-rw-r--r-- | src/monitor/monitor_sbus.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/monitor/monitor_sbus.c b/src/monitor/monitor_sbus.c index 3f73e84f7..d60a087e5 100644 --- a/src/monitor/monitor_sbus.c +++ b/src/monitor/monitor_sbus.c @@ -193,3 +193,16 @@ int monitor_common_res_init(DBusMessage *message, return monitor_common_pong(message, conn); } +int monitor_common_rotate_logs(DBusMessage *message, + struct sbus_connection *conn) +{ + int ret; + + ret = rotate_debug_files(); + if (ret) { + DEBUG(1, ("Could not rotate debug files!\n")); + return ret; + } + + return monitor_common_pong(message, conn); +} |