anchor.diff:      end;
   
   handle_call({get_proc, Lang}, {Client, _} = From, State) ->
  -    IterFun = fun(Proc0, _Acc) ->
  -        Proc = Proc0#proc{client = erlang:monitor(process, Client)},
  -        ets:insert(State#state.tab, Proc),
  -        {stop, Proc}
  +    IterFun = fun(Proc, _Acc) ->
  +        {stop, assign_proc(State#state.tab, Client, Proc)}
       end,
       try iter_procs(State#state.tab, Lang, IterFun, nil) of
       {not_found, _} ->
  
positive.code: 
  handle_info({'EXIT', _, {ok, Proc0, {Client,_} = From}}, State) ->
      link(Proc0#proc.pid),
      Proc = Proc0#proc{client = erlang:monitor(process, Client)},
      gen_server:reply(From, {ok, Proc, get_query_server_config()}),
      ets:insert(State#state.tab, Proc),
      {noreply, State};
  
  handle_info({'EXIT', Pid, Reason}, State) ->
  
negative.code:     unlink(Pid),
      {ok, Proc}.
  
  assign_proc(Tab, Client, #proc{client=nil}=Proc0) ->
      Proc = Proc0#proc{client = erlang:monitor(process, Client)},
      ets:insert(Tab, Proc),
      Proc.
  
  get_query_server_config() ->
      Limit = couch_config:get("query_server_config", "reduce_limit", "true"),
      {[{<<"reduce_limit">>, list_to_atom(Limit)}]}.
  