4ed4ab
diff -up dovecot-2.2.9/src/lib-master/master-service.c.fixit dovecot-2.2.9/src/lib-master/master-service.c
4ed4ab
--- dovecot-2.2.9/src/lib-master/master-service.c.fixit	2013-11-24 14:37:39.000000000 +0100
4ed4ab
+++ dovecot-2.2.9/src/lib-master/master-service.c	2013-11-27 17:52:48.802843395 +0100
4ed4ab
@@ -559,6 +559,11 @@ const char *master_service_get_name(stru
4ed4ab
 	return service->name;
4ed4ab
 }
4ed4ab
 
4ed4ab
+const enum master_service_flags master_service_get_flags(struct master_service *service)
4ed4ab
+{
4ed4ab
+	return service->flags;
4ed4ab
+}
4ed4ab
+
4ed4ab
 void master_service_run(struct master_service *service,
4ed4ab
 			master_service_connection_callback_t *callback)
4ed4ab
 {
4ed4ab
diff -up dovecot-2.2.9/src/lib-master/master-service.h.fixit dovecot-2.2.9/src/lib-master/master-service.h
4ed4ab
--- dovecot-2.2.9/src/lib-master/master-service.h.fixit	2013-11-24 14:37:39.000000000 +0100
4ed4ab
+++ dovecot-2.2.9/src/lib-master/master-service.h	2013-11-27 17:53:05.329705614 +0100
4ed4ab
@@ -134,6 +134,8 @@ const char *master_service_get_version_s
4ed4ab
 /* Returns name of the service, as given in name parameter to _init(). */
4ed4ab
 const char *master_service_get_name(struct master_service *service);
4ed4ab
 
4ed4ab
+const enum master_service_flags master_service_get_flags(struct master_service *service);
4ed4ab
+
4ed4ab
 /* Start the service. Blocks until finished */
4ed4ab
 void master_service_run(struct master_service *service,
4ed4ab
 			master_service_connection_callback_t *callback)
4ed4ab
diff -up dovecot-2.2.9/src/ssl-params/main.c.fixit dovecot-2.2.9/src/ssl-params/main.c
4ed4ab
--- dovecot-2.2.9/src/ssl-params/main.c.fixit	2013-11-24 14:37:39.000000000 +0100
4ed4ab
+++ dovecot-2.2.9/src/ssl-params/main.c	2013-11-27 17:51:06.664694558 +0100
4ed4ab
@@ -103,7 +103,10 @@ static void sig_chld(const siginfo_t *si
4ed4ab
 	if (waitpid(-1, &status, WNOHANG) < 0)
4ed4ab
 		i_error("waitpid() failed: %m");
4ed4ab
 	else if (status != 0)
4ed4ab
+	{
4ed4ab
 		i_error("child process failed with status %d", status);
4ed4ab
+		if(master_service_get_flags(master_service) & MASTER_SERVICE_FLAG_STANDALONE) exit(1);
4ed4ab
+	}
4ed4ab
 	else {
4ed4ab
 		/* params should have been created now. try refreshing. */
4ed4ab
 		ssl_params_refresh(param);