From a815dc29e2a263e018568f5a1aac2f5c59b23373 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 24 Oct 2024 11:09:04 -0700 Subject: [PATCH] debug log --- wrapper.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wrapper.ts b/wrapper.ts index 04a088c..142b0b5 100644 --- a/wrapper.ts +++ b/wrapper.ts @@ -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; } @@ -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;