<div>Hi,</div>
<div> </div>
<div>spawn the server and let it register itself in the initialization part. If the name is already taken, just exit.</div>
<div> </div>
<div>regards,</div>
<div>Vlad<br><br> </div>
<div><span class="gmail_quote">On 5/14/06, <b class="gmail_sendername">Jeff Crane</b> <<a href="mailto:jefcrane@yahoo.com">jefcrane@yahoo.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">%%Start gen_server()<br>start()-><br>       %% greeting msg<br>       io:format(" Started test_server on:~p~n",[self()]),
<br><br>       %% read user/pass<br>       case(<br>               catch register(test_server,spawn(?MODULE,<br>load_accounts, []))<br>       ) of<br>               {'EXIT', _} -><br>                       already_started;
<br>               Pid -><br>                       ok<br>       end.<br>---<br><br>Yes it gets caught, but it also still spawns! What's<br>the proper way to prevent a duplicate spawn if not<br>through case catch register(spawn) ?
<br><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around<br><a href="http://mail.yahoo.com">http://mail.yahoo.com</a><br></blockquote>
</div><br>