couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [1/19] git commit: ?PORT_OPTIONS is always the default for os processes
Date Mon, 11 Feb 2013 13:51:16 GMT
?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) <jhs@iriscouch.com>
Authored: Sun Feb 3 14:33:37 2013 +0000
Committer: Jason Smith (work) <jhs@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) ->


Mime
View raw message