Starting an echo web server from (bash) shell!
zabrane Mikael
zabrane3@REDACTED
Mon Nov 1 23:09:47 CET 2010
Hi list,
I'm facing a strange problem when trying to start my very basic echo
web server from (bash) shell.
It doesn't work when I try to run it from (bash) shell with an error
in "gen_tcp:accept/1" call:
$ erl -s bews
But it works fine when I run it from the Erlang shell:
$ erl
1> bews:start().
The server is simply listening on socket 8888 and echo back what it gets:
...
case catch gen_tcp:accept(ListenSocket) of
{ok, Sock} ->
...
_ ->
exit({error,accept_failed})
end.
Any advices please?
N.B: I'm under OSX Snow Leopard, Erlang R14B (erts-5.8.1)
--
Regards
Zabrane
More information about the erlang-questions
mailing list