<!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.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><SPAN 
class=515123711-08032007><FONT face=Arial color=#0000ff size=2>Hi 
,</FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT color=#0000ff><SPAN 
class=515123711-08032007>I've developed an application which uses spawn/4 .But 
at some instances the pid returned by it is a dummy one i.e. that pid does not 
exist in reality.(i checked it using pman:start().  ). </SPAN><SPAN 
class=515123711-08032007>Due to this<SPAN 
class=828214109-09032007> , </SPAN> my application is going into a 
hanged state<SPAN class=828214109-09032007>  i.e it is sending some message 
o the spawned process but not getting any response from it .It is simply waiting 
for the response </SPAN>.</SPAN></FONT></FONT></FONT></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff size=2>Could 
anyone please tell me how I can check whether the pid is real one or just a 
dummy ?</FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>Also how can I trap the exit signal sent by spawn/4 ?<SPAN 
class=828214109-09032007> </SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT color=#0000ff 
size=2><SPAN class=828214109-09032007></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT color=#0000ff 
size=2><SPAN class=828214109-09032007>Also , when I execute this line in the erl 
prompt it is working fine but when I include it in a file I 'm getting the 
error .</SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT size=2><SPAN 
class=828214109-09032007><FONT 
color=#0000ff>         Pid = 
spawn(</FONT><A href="mailto:'abc@my-pc-01'">'abc@my-pc-01'</A><FONT 
color=#0000ff>, my_file, start, []),</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT color=#0000ff 
size=2><SPAN 
class=828214109-09032007>         
erlang:is_process_alive(Pid),</SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT color=#0000ff 
size=2><SPAN class=828214109-09032007>The above works  well in erl 
 prompt but gives the following error when included in the 
file </SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT size=2><SPAN 
class=828214109-09032007><FONT 
color=#0000ff>         =ERROR REPORT==== 
9-Mar-2007::14:05:19 ===<BR>Error in process <0.30.0> on node </FONT><A 
href="mailto:'abc@m-pc-01'">'abc@m-pc-01'</A><FONT color=#0000ff> with exit 
value: 
{badarg,[{erlang,is_process_alive,[<5064.11526.6>]},{erl_eval,do_apply,5},{shell,eval_loop,2}]}</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial><FONT color=#0000ff 
size=2><SPAN class=828214109-09032007>** exited: 
{badarg,[{erlang,is_process_alive,[<5064.11526.6>]},<BR>                    
{erl_eval,do_apply,5},<BR>                    
{shell,eval_loop,2}]} **<BR>  </SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff size=2>Thanks 
in advance .</FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2>Regards ,</FONT></SPAN></DIV>
<DIV><SPAN class=515123711-08032007><FONT face=Arial color=#0000ff 
size=2>Vikash</FONT></SPAN></DIV></BODY></HTML>

<table><tr><td bgcolor=#ffffff><font color=#000000><br>
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. <br>
<br>
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.<br>
 <br>
www.wipro.com<br>
</font></td></tr></table>