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

on a new system pty is giving `read EIO Use` error and crashing the node process

Open respectTheCode opened this issue 12 years ago • 2 comments

The new system is Ubuntu running in chroot on Chrome OS so it could be a dependency issue. I am running code that has been in production on EC2 Ubuntu boxes for several months without problems.

That said from what I have ready this error isn't an error and just means the the process has closed its output stream. The problem seems to be the pty.js is interpreting this as an error and then crashing because the stream is closed.

respectTheCode avatar May 26 '13 11:05 respectTheCode

So there are a couple of things happening here. First, the event handlers are getting forwarded to the socket and the EIO non-error is bubbling up instead of getting blocked. There is a check the prevents this error event from throwing an error though. The second part of the problem is that after the EIO error the end event is not getting fired. So in my case the only way to catch the end of a process is to listen to the error event and check for EIO.

respectTheCode avatar May 26 '13 16:05 respectTheCode

I'm seeing the EIO error emitted at the close of each spawn, whether the command succeeded or not.

{ [Error: read EIO] code: 'EIO', errno: 'EIO', syscall: 'read' }

Having the error emitted at each close makes the error event less than useful; it's been the only error I've been able to generate.

ryanbmilbourne avatar Sep 15 '15 17:09 ryanbmilbourne