Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1317

couch:start/0 masks failures during startup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: Database Core
    • Labels:
      None
    • Environment:

      Ubuntu, with no erlang-os-mon package installed

      Description

      couch:start/0 ignores the result of application:start/1, masking any errors that happen during startup. e.g. I didn't have Erlang's os_mon modules (from Ubuntu's erlang-os-mon package) installed which caused current couchdb trunk to silently fail to start. The following trivial patch makes it fail immediately:

      diff --git a/src/couchdb/couch.erl b/src/couchdb/couch.erl
      index 956e948..365416e 100644
      — a/src/couchdb/couch.erl
      +++ b/src/couchdb/couch.erl
      @@ -15,7 +15,8 @@
      -compile(export_all).

      start() ->

      • application:start(couch).
        + ok = application:start(couch),
        + ok.

      stop() ->
      application:stop(couch).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              emgee Matt Goodall
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: