tty.ReadStream bug on Node.js 0.11

26 views
Skip to first unread message

Alexandre Strzelewicz

unread,
Sep 23, 2014, 11:29:03 AM9/23/14
to nod...@googlegroups.com
Currently we are working with a library called pty.js that allows us to use fork_pty in Node.js

Everything works well with Node 0.10 but it doesn't with the 0.11.

We deeply inspected the C++ code to interact with fork_pty, everything works as expected (0.11 or 0.10), file descriptors, file are sent as expected.

We suspect tty.ReadStream to be the blocking point of our system.

This is the simple example we try: 

var pty = require('./index.js');

var term = pty.spawn('sh');

term
.write('ls -l\n');
term
.pipe(process.stdout);

With Node.js 0.10, everything work as expect, ls -l is sent to the terminal, we can see the prompt.
But nothing with Node.js 0.11.

We suspect this to fail:

this.socket = new tty.ReadStream(term.fd);
https://github.com/jshkurti/pty.js/blob/master/lib/pty.js#L95

Do someone has any clue to solve this unknown problem ?
Could it come from NaN ?

Thanks,
Alex

Reply all
Reply to author
Forward
0 new messages