[erlang-questions] was there a bugfix to {packet, line} mode between R10B and R11B?

Bengt Kleberg bengt.kleberg@REDACTED
Thu Sep 7 13:30:10 CEST 2006


On 2006-09-05 11:50, Matthias Lang wrote:
> Hi,
> 
> I've attached a test program. It sends lines of data over a TCP
> socket, like this:
> 
>    AAAAAAAAAAAA\r\n
>    BBBBBBBBBBBB\r\n
>    CCCCCCCCCCCC\r\n
>    DDDDDDDDDDDD\r\n
> 
> and then receives them with the {packet, line} option. The odd thing
> is that, sometimes, one of the lines goes missing. Running the test
> for different combinations of OS and OTP release:
> 
>     Operating System        R10B-10       R11B-0
>     -------------------------------------------------------------
>     Linux                   ok            ok
>     Windows XP              fails         ok

could this be related to the (still existing?) problem with windows and 
reading from stdin that was reported both one and two years ago?
the following program does not work on windows (reportedly). it is 
supposed to be run with stdin from a file.

-module(tmp).
-export([main/1]).

main(_Args) ->
	echo_lines(io:get_line('')),
	erlang:halt().

echo_lines(eof) ->
	ok;
echo_lines(Line) ->
	io:put_chars(Line),
	echo_lines(io:get_line('')).


bengt
-- 
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."



More information about the erlang-questions mailing list