【发布时间】:2016-07-21 19:10:55
【问题描述】:
我正在尝试将 gproc 作为应用程序内的 依赖项 启动,但它失败了:
{error,{not_started,gproc}}
这是 Rebar3 在编译时使用的 app.src 文件:
{application, myapp,
[{description, "MyApp"},
{vsn, "0.1.0"},
{registered, []},
{mod, { my_app, []}},
{applications,
[kernel,
stdlib,
sasl,
gproc <--- Dependency, and is compiled with Rebar3
]},
{env,[]},
{modules, []},
{maintainers, []},
{licenses, []},
{links, []}
]}.
当从 shell 开始使用 application:start(gproc). 然后 application:start(myapp). 一切正常。我不明白为什么...
也许是因为某种竞争条件?
shell 开始于:
erl -pa _build/default/lib/*/ebin -boot start_sasl -eval "application:start(myapp)"
编辑:当使用rebar3 shell时一切正常,与我使用的shell命令有什么区别?
【问题讨论】: