[erlang-questions] ets table creation in start script doesn't work

Paul Mineiro <>
Thu Oct 15 23:14:26 CEST 2009


The process that owns the ets table has died.  Try this:

% erl -eval 'spawn (fun () -> ets:new (some_table_name, [ named_table ]),
receive after infinity -> ok end end)'
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] [async-threads:0]
[kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> ets:lookup (some_table_name, 1).
[]

-- p

On Thu, 15 Oct 2009, Matt Handler wrote:

> any clues why this doesn't work as expected:
>
> $ erl -eval "ets:new(some_table_name, [named_table])"
>
> when i get into the shell, it has no knowledge of the ets table
> "some_table_name"
>
> thanks,
> -matt
>



More information about the erlang-questions mailing list