user and server unbound variables

Joe Armstrong joe@REDACTED
Wed Dec 18 14:13:22 CET 2002


On Wed, 18 Dec 2002, Eduardo Figoli wrote:

> 
> Good morning,
> 
> What does spawn_link(user, server, [self()]) mean ?
> I get this line from the code attached (telnet to erlang console).
> I don't know from where do user and server variables come from.
> 
> Thanks,
> Eduardo Figoli
> 

  user and server are not variables they are atoms (because they start
with small letters) - so this means

  spawn  the process  user:server(self())  and create  a  link to  the
spawned process.

  What does this do?

  > erl -man user

  ...

  Should tell you the answer - but this is an undocumented function :-)

  You could read the code to find out:

  	
  1> code:which(user).
  "/usr/local/lib/erlang/lib/kernel-2.8.0/ebin/user.beam"
  2>

  The code is in the ../src directory relative to the object code

  $ less /usr/local/lib/erlang/lib/kernel-2.8.0/src/user.erl
  ...

  What  is appears  is  make all  termoinal  io operations  go to  the
calling process.
  
  /Joe




More information about the erlang-questions mailing list