Skip to content

Commit

Permalink
debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Oct 24, 2024
1 parent 904fc94 commit a815dc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ export class Pty {

// catch end events
const handleClose = () => {
console.log('handle close')
this.#fdEnded = true;
};


let ttyStreamEnded = false;
const handleEnd = () => {
console.log('handle end')
if (ttyStreamEnded) {
return;
}
Expand Down Expand Up @@ -109,6 +111,7 @@ export class Pty {
// EIO only happens when the child dies. It is therefore our only true signal that there
// is nothing left to read and we can start tearing things down. If we hadn't received an
// error so far, we are considered to be in good standing.
console.log('eio')
this.read.off('error', handleError);
handleEnd();
return;
Expand Down

0 comments on commit a815dc2

Please sign in to comment.