I try to spawn new process and register it:
-module(db).
-export([start/0]).
start() ->
register( db , spawn( db, abs, [-100])).
But when i try in erlang shell:
1> db:start().
I see:
true
(emacs@myhost)2>
=ERROR REPORT==== 1-Dec-2010::17:42:27 ===
Error in process <0.112.0> on node ’emacs@myhost’ with exit value: {undef,[{db,abs,[-100]}]}
What’s wrong?
Thank you.
This fails because
db:abs/1is not defined.