summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith (work) <jhs@iriscouch.com>2013-02-03 14:33:37 +0000
committerJason Smith (work) <jhs@iriscouch.com>2013-02-03 14:33:37 +0000
commitc6166597ebb24ea8f9d5961cfcf143da02117486 (patch)
tree3ad64bdc2e24871df3ce49176d571462fc49e7e2
parente0278596ea3ac574bb0e16f730cb92c9a33af4be (diff)
downloadcouchdb-c6166597ebb24ea8f9d5961cfcf143da02117486.tar.gz
?PORT_OPTIONS is always the default for os processes
-rw-r--r--src/couchdb/couch_os_process.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl
index 3a267be21..dd0d5c569 100644
--- a/src/couchdb/couch_os_process.erl
+++ b/src/couchdb/couch_os_process.erl
@@ -33,8 +33,13 @@
start_link(Command) ->
start_link(Command, []).
start_link(Command, Options) ->
- start_link(Command, Options, ?PORT_OPTIONS).
-start_link(Command, Options, PortOptions) ->
+ start_link(Command, Options, []).
+start_link(Command, Options, ExtraPortOptions) ->
+ % The ?PORT_OPTIONS are the defaults.
+ PortOptions = lists:foldl(fun({Key, Val}=Option, State) ->
+ lists:keystore(Key, 1, State, Option)
+ end, ?PORT_OPTIONS, ExtraPortOptions),
+ io:format("start_link: ~p\n", [PortOptions]),
gen_server:start_link(couch_os_process, [Command, Options, PortOptions], []).
stop(Pid) ->