[erlang-bugs] init:get_arguments() lacks -env assignments

Bengt Kleberg bengt.kleberg@REDACTED
Thu Jul 23 15:26:27 CEST 2009


Greetings,

I would like to add that the documentation
(http://erlang.org/doc/man/erl.html) states:

"In the following list, init flags are marked (init flag). Unless
otherwise specified, all other flags are user flags, for which the
values can be retrieved by calling init:get_argument/1."

Since -env is not marked (init flag) it should be available.


bengt

On Fri, 2009-06-26 at 12:47 -0700, Michael Truog wrote:
> It would be nice if the -env flags would be passed onto the higher
> layers so they are accessible in the init module.  That way, programs
> that use the slave module can pass on the same environment to other
> machines, assuming they are all setup the same.  I do not know of other
> command line flags that are inaccessible within the Erlang VM by the
> init module, the documentation doesn't mention any.  All the init
> functions are affected, not just get_arguments().  An example is below:
> 
> $ erl -env A_SHELL_VARIABLE 1
> Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:4:4] [rq:4]
> [async-threads:0] [kernel-poll:false]
> 
> Eshell V5.7.2  (abort with ^G)
> 1> init:get_arguments().
> [{root,["/home/user/installed/lib/erlang"]},
>  {progname,["erl"]},
>  {home,["/home/user"]}]
> 2>
> 
> 
> Thanks,
> Michael Truog
> 
> ________________________________________________________________
> erlang-bugs mailing list. See http://www.erlang.org/faq.html
> erlang-bugs (at) erlang.org
> 



More information about the erlang-bugs mailing list