[erlang-questions] gen_tcp and processes receiving
Fri Oct 5 20:15:52 CEST 2007
Per and Bruce, thank you for your answers.
Per Hedeland wrote:
> Fitzsimons <> wrote:
> No it doesn't - but it starts working when self() is evaluated in the
> original process instead of in the spawned one, i.e.
> @@ -12,12 +12,13 @@
> "Host: www.erlang.org\r\n"
> "Connection: close\r\n"
> + Master = self(),
> Pid = spawn_link(fun() ->
> go ->
> - receiver(self(), Socket)
> + receiver(Master, Socket)
> ok = gen_tcp:controlling_process(Socket, Pid),
> Pid ! go,
D'oh, I shouldn't post when I'm in a hurry.
However, I've not been able to reproduce the ebadf fault in this tiny
program. I will continue research on this. I vaguely suspect SMP
triggering this problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the erlang-questions