[erlang-questions] Joe's book, ~/.erlang and Makefiles

Bengt Kleberg bengt.kleberg@REDACTED
Mon May 11 08:42:23 CEST 2009


Greetings,

Apart from the possibility that ~/.erlang is writing to stdout you might
also want to consider other things, like SASL. On my machine I get:

seasc1137> ERLANG_LIBDIR=`erl -noshell -eval 'io:format("~s/lib~n",
[[code:lib_dir("erl_interface")]]).' -s erlang halt`
seasc1137> echo $ERLANG_LIBDIR
=PROGRESS REPORT==== 11-May-2009::08:38:02 === supervisor:
{local,sasl_safe_sup} started: [{pid,<0.33.0>}, {name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}}, {restart_type,permanent},
{shutdown,2000}, {child_type,worker}] =PROGRESS REPORT====
11-May-2009::08:38:02 === supervisor: {local,sasl_safe_sup} started:
[{pid,<0.34.0>}, {name,overload}, {mfa,{overload,start_link,[]}},
{restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 11-May-2009::08:38:02 === supervisor:
{local,sasl_sup} started: [{pid,<0.32.0>}, {name,sasl_safe_sup}, {mfa,
{supervisor,start_link, [{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent}, {shutdown,infinity}, {child_type,supervisor}]
=PROGRESS REPORT==== 11-May-2009::08:38:02 === supervisor:
{local,sasl_sup} started: [{pid,<0.35.0>}, {name,release_handler},
{mfa,{release_handler,start_link,[]}}, {restart_type,permanent},
{shutdown,2000}, {child_type,worker}] =PROGRESS REPORT====
11-May-2009::08:38:02 === application: sasl started_at:
nonode@REDACTED /vobs/otp/otp_delivery/sles10_32/lib/erl_interface-3.6.1/lib


bengt

On Sat, 2009-05-09 at 21:05 -0400, Andrew Thompson wrote:
> So, I've run into this problem twice now, and I'm wondering if there's a
> workaround that googling and grepping all the .erl files in the erlang
> distribution hasn't revealed.
> 
> In Joe's book, he apparently has people put "io:format("Running
> Erlang~n")." in their ~/.erlang file to illustrate how to modify
> default behaviour. That's fine, but it seems that people forget to
> remove it later, so when they try to run a Makefile that does something
> like this:
> 
> ERLANG_LIBDIR=`$ERLANG -noshell -eval 'io:format("~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt`
> 
> it all goes rather wrong. I've managed to find the erlangrc() function
> in stdlib/src/c.erl but I can't figure out what is calling it. I wonder
> why ~/.erlang is even evaluated when running with -noshell but I can't
> find a way to bypass it in any case.
> 
> Any ideas?
> 
> Andrew
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list