anchor.diff:  get_procs(Tab, Lang) when is_binary(Lang) ->
       get_procs(Tab, binary_to_list(Lang));
   get_procs(Tab, Lang) when is_list(Lang) ->
  -    case ets:match_object(Tab, #proc{lang=Lang, client=nil, _='_'}) of
  -    [] ->
  -        {ok, NewProc} = new_proc(Lang), % check OS process limit
  -        [NewProc];
  -    Procs ->
  -        Procs
  -    end.
  -
  -new_proc(Lang) when is_list(Lang) ->
  +    ets:match_object(Tab, #proc{lang=Lang, client=nil, _='_'}).
  +
  +new_proc(From, Lang) ->
  +    case new_proc_int(From, Lang) of
  +    {ok, Proc} ->
  +        exit({ok, Proc, From});
  +    Error ->
  +        gen_server:reply(From, {error, Error})
  +    end.
  +
  +new_proc(From, Lang, DDoc, DDocKey) ->
  +    case new_proc_int(From, Lang) of
  +    {ok, NewProc} ->
  +        case proc_with_ddoc(DDoc, DDocKey, [NewProc]) of
  +        {ok, Proc} ->
  +            exit({ok, Proc, From});
  +        {error, Reason} ->
  +            gen_server:reply(From, {error, Reason})
  +        end;
  +    Error ->
  +        gen_server:reply(From, {error, Error})
  +    end.
  +
  +new_proc_int(From, Lang) when is_binary(Lang) ->
  +    new_proc_int(From, binary_to_list(Lang));
  +new_proc_int(From, Lang) when is_list(Lang) ->
       case couch_config:get("query_servers", Lang) of
       undefined ->
           case couch_config:get("native_query_servers", Lang) of
           undefined ->
  -            throw({unknown_query_language, Lang});
  +            gen_server:reply(From, {unknown_query_language, Lang});
           SpecStr ->
               {ok, {M,F,A}} = couch_util:parse_term(SpecStr),
               {ok, Pid} = apply(M, F, A),
  
positive.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, 
      code_change/3]).
  
  -export([start_link/0, get_proc_count/0]).
  
  -include("couch_db.hrl").
  
  
negative.code:         set_timeout_fun = {Mod, set_timeout},
          stop_fun = {Mod, stop}
      },
      unlink(Pid),
      {ok, Proc}.
  
  get_query_server_config() ->
  