summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_external_server.erl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2010-04-02 20:01:11 +0000
committerDamien F. Katz <damien@apache.org>2010-04-02 20:01:11 +0000
commitc1ba70c38adef885ee50687210732c3999951a08 (patch)
treec96c961c0f08cde85d990151937a6aa58b43e294 /src/couchdb/couch_external_server.erl
parent3a30ebac70a7baef18719357c8b7ff00edbbfa83 (diff)
Deterministic/synchronous shutdown code.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@930363 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_external_server.erl')
-rw-r--r--src/couchdb/couch_external_server.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_external_server.erl b/src/couchdb/couch_external_server.erl
index 8e495320..045fcee9 100644
--- a/src/couchdb/couch_external_server.erl
+++ b/src/couchdb/couch_external_server.erl
@@ -50,9 +50,11 @@ terminate(_Reason, {_Name, _Command, Pid}) ->
handle_call({execute, JsonReq}, _From, {Name, Command, Pid}) ->
{reply, couch_os_process:prompt(Pid, JsonReq), {Name, Command, Pid}}.
+handle_info({'EXIT', _Pid, normal}, State) ->
+ {noreply, State};
handle_info({'EXIT', Pid, Reason}, {Name, Command, Pid}) ->
?LOG_INFO("EXTERNAL: Process for ~s exiting. (reason: ~w)", [Name, Reason]),
- {stop, normal, {Name, Command, Pid}}.
+ {stop, Reason, {Name, Command, Pid}}.
handle_cast(stop, {Name, Command, Pid}) ->
?LOG_INFO("EXTERNAL: Shutting down ~s", [Name]),