pty.js
pty.js copied to clipboard
pty.resize - ioctl failed.
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?
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 .. .)