[erlang-questions] Problem with io monitor - a bug?
Fri Nov 30 14:03:34 CET 2012
If I "put the shell process to sleep":
The prompt from the io:read appears.
It seems that the shell process "greedily" locks the io monitor...
2012/11/30 Álvaro <>
> Dear all,
> Every time I run this simple code, my program gets stuck:
> > Pid = spawn (moduleName,myread,["hello"]).
> Result = io:read(Prompt),
> io:format("Res: ~p~n",[Result]),
> io:format("Read error: ~p:~p~n",[A,B]),
> if I check the status of the process:
> > erlang:process_info(Pid).
> It seems to be stuck in the function io:wait_io_mon_reply/2 (surfing
> through io.erl I found that this function waits for a response from the
> process managing the io ). This process is not answering, hence my code
> stops working.
> I've checked that the "group_leader()" once I spawn the reading process is
> the same used by my shell.
> Any ideas on how to deal with it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions