<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>Hi,</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-erlang-questions@erlang.org
[mailto:owner-erlang-questions@erlang.org] <B>On Behalf Of </B>Eric
Shun<BR></FONT></DIV>
<DIV><BR>I'd like to send a message to a process on another node. As I don't
want to register the pid, I can't use <BR>{Node,Pid} ! Message.<BR>So I can I
know the "public" pid of a process (eg: <5533,245,0>) , as self() only
returns a "private" pid (eg: <0,245,0>)? <BR>So I could do:<BR>PublicPid
! Message.<BR><BR><SPAN class=416503613-04052006><FONT face="Courier New"
color=#0000ff size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>There is no public pid for a process. </FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>What you can do is send the pid through a message, and then the receiver
will be able to use it. Receivers on different runtimes will see
different-looking pids.</FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>Of course, you have then a chicken-and-egg problem: if the client wants
to get the pid, who does it ask? It can't ask the process itself, because it
doesn't know its pid. It has to be able to access some process by name, and from
there retrieve the required pid; alternatively, reconsider registering the
process.</FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>Why do you need to remotely access an unregistered process?
</FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>best regards,</FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2>Vlad</FONT></SPAN></DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=416503613-04052006><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV></BODY></HTML>