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

Erik Søe Sørensen <>
Sun Aug 11 20:04:35 CEST 2013


Sounds like you have two processes connected to the same stdin source,
which both read all the time.
Have you tried adding "</dev/null" to the Java command line?
Den 11/08/2013 19.54 skrev "OvermindDL1" <>:

> For note, the 'swallowed' keys pressed in the Erlang shell seem to get
> passed to stdin of the launched child process, and not all input is
> swallowed, it seems quite random whether it gets passed to the Erlang shell
> or to the launched process.
> On Aug 11, 2013 7:34 AM, "Serge Aleynikov" <> wrote:
>
>> 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
>> '
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130811/c517d67c/attachment.html>


More information about the erlang-questions mailing list