[erlang-questions] Erlang shell lag when using open_port/2

Serge Aleynikov serge@REDACTED
Sun Aug 11 15:31:32 CEST 2013


While looking at the issue described here [1] I drilled the issue down
to the following problem with erlang:open_port/2 (note: get
minecraft_server.1.6.2.jar here [2]):

When executing:

f(P), P = erlang:open_port({spawn, "java -Xms1G -Xmx1G -jar
minecraft_server.1.6.2.jar nogui"}, [binary, exit_status, nouse_stdio]).

The Erlang shell has a very noticeable lag between key presses, and
seems to "swallow" some typed keys.

On the other hand, when running the same command without 'nouse_stdio'
option, the Erlang shell behaves as expected.

Is this a bug?  If not, how can I take advantage of nouse_stdio and not
have that impact on the Erlang shell?

Serge

[1] https://github.com/saleyn/erlexec/issues/17
[2] wget
'https://s3.amazonaws.com/Minecraft.Download/versions/1.6.2/minecraft_server.1.6.2.jar'



More information about the erlang-questions mailing list