[erlang-bugs] R15B01 : lib:progname/0 of erlc is erl...

Tue Jun 5 21:53:41 CEST 2012

sorry to monopolize the list.

I'm using ~/.erlang file in order to automatize some applications start
in developpement.

But my applications are starting when compiling with erlc .
Well, erlc evaluates ~/.erlang at start like erl . OK...

I first used some plain arguments on erl start to detect erl or erlc but
I forget often to add it in my command line. I wanted to do something

So I wrote in my ~/.erlang file :
case lib:progname() of
	'erlc' ->  ok ; % do nothing
	'erl'  ->  % start my favorite apps

Applications are starting anyway when compiling.

This can be seen by writing in ~/.erlang file :

erlc -Wall -I include -o ebin/ src/xxxxx.erl

The progname of erlc is erl ...

--------- Erlang doc -----------------------------------------
lib:progname() -> atom()

Returns the name of the script that started the current Erlang session.

erlc is a binary, erl is a shell script that launch erlexec which is a
binary too.
So what exactly the meaning of the documentation ? Is it a bug in erlc ?
Even if erlc is a wrapper of erl, I suppose it should have erlc as
program name ...


More information about the erlang-bugs mailing list