Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D10D17B03 for ; Tue, 21 Apr 2015 18:22:33 +0000 (UTC) Received: (qmail 91996 invoked by uid 500); 21 Apr 2015 18:22:33 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 91939 invoked by uid 500); 21 Apr 2015 18:22:33 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 91926 invoked by uid 99); 21 Apr 2015 18:22:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2015 18:22:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2D770E0280; Tue, 21 Apr 2015 18:22:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chewbranca@apache.org To: commits@couchdb.apache.org Message-Id: <2f2c9b0b7a004c6796961bcc9d696a59@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: couch commit: updated refs/heads/master to fc1899b Date: Tue, 21 Apr 2015 18:22:33 +0000 (UTC) Repository: couchdb-couch Updated Branches: refs/heads/master d4ae1a44a -> fc1899bed Fix error handling in couch_util:with_proc Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/fc1899be Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/fc1899be Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/fc1899be Branch: refs/heads/master Commit: fc1899bede1ad0554d8cdda09963a4dafa75fd54 Parents: d4ae1a4 Author: Russell Branca Authored: Tue Apr 21 18:10:44 2015 +0000 Committer: Russell Branca Committed: Tue Apr 21 18:22:17 2015 +0000 ---------------------------------------------------------------------- src/couch_util.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/fc1899be/src/couch_util.erl ---------------------------------------------------------------------- diff --git a/src/couch_util.erl b/src/couch_util.erl index 69fd53f..742ab70 100644 --- a/src/couch_util.erl +++ b/src/couch_util.erl @@ -576,10 +576,10 @@ ensure_loaded(_Module) -> false. %% a function that does a receive as it would hijack incoming messages. with_proc(M, F, A, Timeout) -> {Pid, Ref} = spawn_monitor(fun() -> - exit(erlang:apply(M, F, A)) + exit({reply, erlang:apply(M, F, A)}) end), receive - {'DOWN', Ref, process, Pid, Resp} -> + {'DOWN', Ref, process, Pid, {reply, Resp}} -> {ok, Resp}; {'DOWN', Ref, process, Pid, Error} -> {error, Error}