dovecot-2.2: lib-master: Added master_service_is_master_stopped()
dovecot at dovecot.org
dovecot at dovecot.org
Tue Apr 23 21:32:44 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/b8be0d35228e
changeset: 16319:b8be0d35228e
user: Timo Sirainen <tss at iki.fi>
date: Tue Apr 23 21:31:52 2013 +0300
description:
lib-master: Added master_service_is_master_stopped()
diffstat:
src/lib-master/master-service.c | 5 +++++
src/lib-master/master-service.h | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
diffs (28 lines):
diff -r 25679980d267 -r b8be0d35228e src/lib-master/master-service.c
--- a/src/lib-master/master-service.c Tue Apr 23 21:08:31 2013 +0300
+++ b/src/lib-master/master-service.c Tue Apr 23 21:31:52 2013 +0300
@@ -600,6 +600,11 @@
return service->killed;
}
+bool master_service_is_master_stopped(struct master_service *service)
+{
+ return service->io_status_error == NULL;
+}
+
void master_service_anvil_send(struct master_service *service, const char *cmd)
{
ssize_t ret;
diff -r 25679980d267 -r b8be0d35228e src/lib-master/master-service.h
--- a/src/lib-master/master-service.h Tue Apr 23 21:08:31 2013 +0300
+++ b/src/lib-master/master-service.h Tue Apr 23 21:31:52 2013 +0300
@@ -141,6 +141,9 @@
void master_service_stop_new_connections(struct master_service *service);
/* Returns TRUE if we've received a SIGINT/SIGTERM and we've decided to stop. */
bool master_service_is_killed(struct master_service *service);
+/* Returns TRUE if our master process is already stopped. This process may or
+ may not be dying itself. */
+bool master_service_is_master_stopped(struct master_service *service);
/* Send command to anvil process, if we have fd to it. */
void master_service_anvil_send(struct master_service *service, const char *cmd);
More information about the dovecot-cvs
mailing list