[erlang-questions] pseudoterminal port process

Tony Rogvall <>
Sat Oct 12 02:23:48 CEST 2013


Not exactly sure what you want to do but ...
have a look at https://github.com/tonyrog/uart, it has got some support for pseduo terminals, 
use "//pty" as the device name in uart:open, and then get the name of the selected slave
device by calling uart:getopts(Uart, [device])

There is an option {ptypkt, boolean()} that can be used to turn on pty packet mode (TIOCPKT)
this is handy for pseudo terminal flow control handling. Because of a little bug, this option
can not be given when opening the device but must be set with uart:setopts (there is a fix on its way)

/Tony


On 11 okt 2013, at 22:49, Daniel Goertzen <> wrote:

> I have an application where I want to run an Erlang SSH server for some highly customized authentication, and then just plumb the i/o to a C++ ncurses port program.  The problem I have is that the C++ program expects to run under a terminal, and open_port/2 appears to have no pseudoterminal support.  Before I run off and start writing a pseudoterminal wrapper port, is anyone aware of an existing wrapper or some other solution for my problem?
> 
> Thanks,
> Dan.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131012/bcc30322/attachment.html>


More information about the erlang-questions mailing list