spawn_link(N,M,F,A)

Shawn Pearce pearcs@REDACTED
Thu Dec 10 09:22:25 CET 1998


Ok, this might be a rather "stupid" question, but here goes:

I've written a simple client/server counter module based on the stuff from the
book.  I've got two different erl JAM vm's running, one named "a@REDACTED", the
other "nt@REDACTED" using -sname for both.  nt@REDACTED cannot find my counter
module due to the fact that its not in the current directory.  a@REDACTED has it
loaded already from the shell ("c(counter).").

When i do this from a third shell:

spearce% erl_call -e -sname a@REDACTED
P=spawn_link('nt@REDACTED',erlang,apply,[counter,inc,[list_to_pid("<0.43.0>")]]),
receive
        Any -> {P,Any}
end.
^D

the erl_call hangs with no output, and nothing is logged to either process. 
Shouldn't i be getting an {'EXIT',{undef,{counter,inc,[<0.43.0>]}} message sent
to the thread handling the erl_call?  Or am i looking at this the wrong way?

Just seemed rather strange with spawn about how certain errors are handled and
seem to deadlock a process....

(btw, nothing else is deadlocked, just this one erl_call.)

TIA.

--
Shawn.

(The above are the rantings of a body without a mind.)




More information about the erlang-questions mailing list