Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pty.resize - ioctl failed. #187

Open
LaKing opened this issue Jun 7, 2017 · 1 comment
Open

pty.resize - ioctl failed. #187

LaKing opened this issue Jun 7, 2017 · 1 comment

Comments

@LaKing
Copy link

LaKing commented Jun 7, 2017

I get this error and crashes my app from time to time.

/usr/lib/node_modules/pty.js/lib/pty.js:354
pty.resize(this.fd, cols, rows);
^

Error: ioctl(2) failed.
at Error (native)
at Terminal.resize (/usr/lib/node_modules/pty.js/lib/pty.js:354:7)

.. I think this happens if the pid of the emulated tty is closed.

How could I fix it so it does not crah my app. What should I check on the pty object?

@LaKing
Copy link
Author

LaKing commented Jun 7, 2017

Okay, so at resize, I have to manually chheck if the terminal is healthy.

Ended up with ckecking this:
if (!socket.term.readable || !socket.term.writable || socket.term.destroyed) return;

I think this should be a builtin check .. .)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant