[erlang-questions] what does l/1 really do?

Hynek Vychodil hynek@REDACTED
Fri Jul 29 17:02:50 CEST 2011


l/1 do eaxctly

l(Mod) ->
    code:purge(Mod),
    code:load_file(Mod).

See https://github.com/erlang/otp/blob/dev/lib/stdlib/src/c.erl#L251

On Fri, Jul 29, 2011 at 4:27 PM, Daniel Dormont
<dan@REDACTED> wrote:
> While reading through some old discussion here or on TrapExit when I was
> first trying to understand hot code loading, I ran across the shell command
> l/1. Since then I've used it to good effect in patching a live system
> (Ejabberd, specifically) with new or upgraded modules. But I'd like to
> understand a little better what it's doing behind the scenes. I didn't see
> any mention of it in the manual, and it's a little hard to Google for single
> letters :), so I thought I'd ask here.
>
> I also have a more specific question. I have a whole bunch of gen_fsm
> processes that I *believe* have a common supervisor but I won't swear to it.
> If I want to upgrade the module, is there a way to institute the code change
> right away across all those processes?
>
> thanks,
> Dan
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>



-- 
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill
your boss.  Be a data hero!
Try GoodData now for free: www.gooddata.com



More information about the erlang-questions mailing list