[erlang-bugs] R16B - io:rows(self()), io:nl(self()) and io:colums(self()) never return .

Patrik Nyblom pan@REDACTED
Tue Jun 4 17:49:11 CEST 2013


Hi!

On 06/01/2013 05:10 PM, PAILLEAU Eric wrote:
> Hello,
>
> while io:rows(), io:nl() and io:columns() in the Erlang shell are
> working, I tried the arity /1 of those functions with self() as argument.
> All those functions with such argment looks to never return .
The parameter has to be an "IO device" (type device() in the doc)? As 
the documentation states: "Either standard_io, standard_error, a 
registered name, or a pid handling IO protocols" (which maybe should 
read "a pid of a process handling the IO protocol", but anyway :)). The 
IO protocol is described in stdlib users guide, chapter "The Erlang 
I/O-protocol".

You basically send a message to a process that never responds, and as 
IO-servers are not required to respond within a certain time frame, the 
io-module will wait indefinitely for an answer from the process. This is 
not a bug.
> Regards
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
Regards,
/Patrik, OTP



More information about the erlang-bugs mailing list