Closed symphorien closed 5 years ago
The ci build failure seems spurious to me. Please tell me if there is something to fix.
Regarding pure, when this is merged, I will do a pull request to pure to take this failure mode into account.
Oh, that's awesome. Looking forward to it, and thanks again for this 😄.
In some cases, the fd created by zpty can become corrupted: if the other end was disconnected, if the fd was closed and so on. If we ignore this condition, then we enter a infinite loop. This eats 100% of a cpu and is very annoying.
Instead, when the fd becomes invalid, this commit unregisters the corresponding worker and notifies the callback. The error code was chosen to be "[async]" because the readme mentions this is how some existing errors are already notified to callbacks.
I have discovered this problem as part of the pure prompt. This happens randomly about once a week. I have been using this fork for some time, now, and the problem has disappeared.
The tests still pass.