From 2c260766864a56e10aa45c3b1782f640b21a0bac Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Thu, 20 Nov 2008 04:42:43 +0000 Subject: Nearly completed security/validation work. Still needs replication testing. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@719160 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_server_sup.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/couchdb/couch_server_sup.erl') diff --git a/src/couchdb/couch_server_sup.erl b/src/couchdb/couch_server_sup.erl index b75747d7..9c74a1a3 100644 --- a/src/couchdb/couch_server_sup.erl +++ b/src/couchdb/couch_server_sup.erl @@ -14,7 +14,9 @@ -behaviour(supervisor). --export([start_link/1,stop/0,couch_config_start_link_wrapper/2,start_primary_services/0,start_secondary_services/0]). +-export([start_link/1,stop/0, couch_config_start_link_wrapper/2, + start_primary_services/0,start_secondary_services/0, + restart_core_server/0]). -include("couch_db.hrl"). @@ -29,6 +31,10 @@ start_link(IniFiles) -> {error, already_started} end. +restart_core_server() -> + supervisor:terminate_child(couch_primary_services, couch_server), + supervisor:restart_child(couch_primary_services, couch_server). + couch_config_start_link_wrapper(IniFiles, FirstConfigPid) -> case is_process_alive(FirstConfigPid) of true -> @@ -119,7 +125,7 @@ start_server(IniFiles) -> {ok, Pid}. start_primary_services() -> - supervisor:start_link(couch_server_sup, + supervisor:start_link({local, couch_primary_services}, couch_server_sup, {{one_for_one, 10, 3600}, [{couch_log, {couch_log, start_link, []}, @@ -156,7 +162,7 @@ start_secondary_services() -> || {Name, SpecStr} <- couch_config:get("daemons"), SpecStr /= ""], - supervisor:start_link(couch_server_sup, + supervisor:start_link({local, couch_secondary_services}, couch_server_sup, {{one_for_one, 10, 3600}, DaemonChildSpecs}). stop() -> -- cgit v1.2.3