pty.js icon indicating copy to clipboard operation
pty.js copied to clipboard

pty.resize - ioctl failed.

Open LaKing opened this issue 8 years ago • 1 comments

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 avatar Jun 07 '17 23:06 LaKing

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 .. .)

LaKing avatar Jun 07 '17 23:06 LaKing