diff options
Diffstat (limited to 'src/couchdb/couch_os_process.erl')
-rw-r--r-- | src/couchdb/couch_os_process.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl index f42e99a8..244a59f5 100644 --- a/src/couchdb/couch_os_process.erl +++ b/src/couchdb/couch_os_process.erl @@ -62,10 +62,9 @@ prompt(Pid, Data) -> writeline(OsProc, Data) when is_record(OsProc, os_proc) -> port_command(OsProc#os_proc.port, Data ++ "\n"). -readline(OsProc) when is_record(OsProc, os_proc) -> +readline(#os_proc{} = OsProc) -> readline(OsProc, []). -readline(OsProc, Acc) when is_record(OsProc, os_proc) -> - #os_proc{port=Port} = OsProc, +readline(#os_proc{port = Port} = OsProc, Acc) -> receive {Port, {data, {noeol, Data}}} -> readline(OsProc, [Data|Acc]); |