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 42BFC17A89 for ; Tue, 21 Apr 2015 18:11:10 +0000 (UTC) Received: (qmail 55074 invoked by uid 500); 21 Apr 2015 18:11:10 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 55019 invoked by uid 500); 21 Apr 2015 18:11:10 -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 55009 invoked by uid 99); 21 Apr 2015 18:11:10 -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:11:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F1304DFF85; Tue, 21 Apr 2015 18:11:09 +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: <2b6f75c2a12f45b98bb8deb85b3edea2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: couch commit: updated refs/heads/2657-fix-cassim-fabric-calls-revised to 67584b9 Date: Tue, 21 Apr 2015 18:11:09 +0000 (UTC) Repository: couchdb-couch Updated Branches: refs/heads/2657-fix-cassim-fabric-calls-revised [created] 67584b931 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/67584b93 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/67584b93 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/67584b93 Branch: refs/heads/2657-fix-cassim-fabric-calls-revised Commit: 67584b93195a8b6332bc4b2efa4b3ef19eccfa53 Parents: d4ae1a4 Author: Russell Branca Authored: Tue Apr 21 18:10:44 2015 +0000 Committer: Russell Branca Committed: Tue Apr 21 18:10:44 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/67584b93/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}