From d6946dc120a7eaf0897e2149317a2ead477af297 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Tue, 9 Jun 2009 00:56:34 +0000 Subject: Fixes COUCHDB-372 New couchspawnkillable requires update notifiers to expect a line of input to be read back. Undeleting the couch_os_process:write/2 method that got ixnayed. Now named send/2 and uses a gen_server:cast/2 to make it more apparent on what's going on. Thanks rnewson. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@782854 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_db_update_notifier.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/couchdb/couch_db_update_notifier.erl') diff --git a/src/couchdb/couch_db_update_notifier.erl b/src/couchdb/couch_db_update_notifier.erl index a1019556..f21ce057 100644 --- a/src/couchdb/couch_db_update_notifier.erl +++ b/src/couchdb/couch_db_update_notifier.erl @@ -37,7 +37,7 @@ stop(Pid) -> couch_event_sup:stop(Pid). init(Exec) when is_list(Exec) -> % an exe - couch_os_process:start_link(Exec, [], [stream, exit_status, hide]); + couch_os_process:start_link(Exec, []); init(Else) -> {ok, Else}. @@ -55,7 +55,7 @@ handle_event(Event, {Fun, FunAcc}) -> {ok, {Fun, FunAcc2}}; handle_event({EventAtom, DbName}, Pid) -> Obj = {[{type, list_to_binary(atom_to_list(EventAtom))}, {db, DbName}]}, - true = couch_os_process:write(Pid, Obj), + ok = couch_os_process:send(Pid, Obj), {ok, Pid}. handle_call(_Request, State) -> -- cgit v1.2.3