Was Mapping processes Now: ATOMS and atom_tab index

Luke Gorrie luke@REDACTED
Thu Dec 19 20:40:29 CET 2002

"Valentin" <valentin@REDACTED> writes:

> I agree that PID can be used to uniquely identify processes, and that works
> very well if the application completely lives in ERLANG and/or one part
> lives in ERLANG (i.e. server) and another in some other environment (i.e.
> CNode).

But what makes it break down in the other environments?

Note that you can turn a PID into a binary and back again:

  1> Bin = term_to_binary(self()).
  2> binary_to_term(Bin).

You can also turn it into a string and back again:

  3> httpd_util:encode_base64(binary_to_list(term_to_binary(self()))).
  4> binary_to_term(list_to_binary(httpd_util:decode_base64("g2dkAA1ub25vZGVAbm9ob3N0AAAAGwAAAAAA"))).

Keep in mind that this is forgeable - but so is a string naming a
registered process.


More information about the erlang-questions mailing list