summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_db_updater.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
commitd318717866ffa267781ab482e99a05415e2ac0e4 (patch)
tree207409d78eacca8e206deb05b99689ec449722a4 /src/couchdb/couch_db_updater.erl
parent3a3a9c1efab1c9fe4cd5ebb6c80da4005eb0806b (diff)
reverting damien's latest commit until we can figure out why it's causing failures
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db_updater.erl')
-rw-r--r--src/couchdb/couch_db_updater.erl13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl
index fdd79481..982ee03a 100644
--- a/src/couchdb/couch_db_updater.erl
+++ b/src/couchdb/couch_db_updater.erl
@@ -20,7 +20,6 @@
init({MainPid, DbName, Filepath, Fd, Options}) ->
- process_flag(trap_exit, true),
case lists:member(create, Options) of
true ->
% create a new header and writes it to the file
@@ -38,10 +37,8 @@ init({MainPid, DbName, Filepath, Fd, Options}) ->
{ok, Db2#db{main_pid=MainPid}}.
-terminate(_Reason, Db) ->
- couch_file:close(Db#db.fd),
- couch_util:shutdown_sync(Db#db.compactor_pid),
- couch_util:shutdown_sync(Db#db.fd_ref_counter),
+terminate(Reason, _Srv) ->
+ couch_util:terminate_linked(Reason),
ok.
handle_call(get_db, _From, Db) ->
@@ -217,11 +214,7 @@ handle_info(delayed_commit, Db) ->
Db2 ->
ok = gen_server:call(Db2#db.main_pid, {db_updated, Db2}),
{noreply, Db2}
- end;
-handle_info({'EXIT', _Pid, normal}, Db) ->
- {noreply, Db};
-handle_info({'EXIT', _Pid, Reason}, Db) ->
- {stop, Reason, Db}.
+ end.
code_change(_OldVsn, State, _Extra) ->
{ok, State}.