[erlang-questions] Escript and spawn
jm
jeffm@REDACTED
Sat Apr 28 03:21:41 CEST 2007
Erik de Castro Lopo wrote:
> #!/usr/bin/env escript
>
> -module (test).
> -export ([ main/1, new_process/0 ]).
>
> new_process () ->
> io:format ("new_process\n"),
> exit ("Done").
>
> main (_) ->
> spawn (?MODULE, new_process, []),
> timer:sleep (5000),
> ok.
>
First the warning: I haven't used escript.
What happens if you change ?MODULE to test, I'm guessing the escript
doesn't support macro expansion, ie it's a function of erlc.
Jeff.
More information about the erlang-questions
mailing list