You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jh...@apache.org on 2013/02/11 14:51:16 UTC
[1/19] git commit: ?PORT_OPTIONS is always the default for os
processes
?PORT_OPTIONS is always the default for os processes
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c6166597
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c6166597
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c6166597
Branch: refs/heads/nodejs_couchdb
Commit: c6166597ebb24ea8f9d5961cfcf143da02117486
Parents: e027859
Author: Jason Smith (work) <jh...@iriscouch.com>
Authored: Sun Feb 3 14:33:37 2013 +0000
Committer: Jason Smith (work) <jh...@iriscouch.com>
Committed: Sun Feb 3 14:33:37 2013 +0000
----------------------------------------------------------------------
src/couchdb/couch_os_process.erl | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/c6166597/src/couchdb/couch_os_process.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl
index 3a267be..dd0d5c5 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) ->