Sticky directory?

Sebastian Strollo seb@REDACTED
Fri Oct 18 03:43:48 CEST 2002

James Hague <jamesh@REDACTED> writes:

> I know what this is.  It's because I had a module with the same name as a
> module in stdlib.


> I'm still not sure what "sticky directory" means, but
> renaming the module fixed the problem.

Well, we were having a lot of people shooting themselves in the foot
when they made their first module called "lists"... :-) So we invented
something to prevent the whole system from come crashing down in such
cases. A directory (in the search path) can be marked sticky to the
code loader, then if anyone tries to load a module with the same name
as a module already loaded from such a sticky directory you get the
error you saw. From the manpage for "code":

       stick_dir(Dir) -> ok | {error, term()}

              Types  Dir = string()

              This  function  marks  Dir  as 'sticky'. The system
              issues a warning and rejects the request if a  user
              tries  to  re-load  a module in a sticky directory.
              Sticky directories are used to warn the user  about
              inadvertent changes to system software.



More information about the erlang-questions mailing list