feat(simulator): clean restoration of SIGWINCH refresh logic

This commit is contained in:
Mahima Shanware
2026-05-07 00:38:41 +00:00
parent a9f7575b4b
commit d428edbdcf
+5 -5
View File
@@ -122,7 +122,7 @@ export class UserSimulator {
let screen = this.getScreen(); let screen = this.getScreen();
let strippedScreen = ''; let strippedScreen = '';
let normalizedScreen = ''; let normalizedScreen = '';
const refreshDelays = []; // SIGWINCH DISABLED const refreshDelays = [1500, 3000, 5000];
for (let attempt = 0; attempt < refreshDelays.length; attempt++) { for (let attempt = 0; attempt < refreshDelays.length; attempt++) {
if (!screen) break; if (!screen) break;
@@ -155,9 +155,9 @@ export class UserSimulator {
`[SIMULATOR] Screen blank and BLOCKED. Attempting SIGWINCH refresh ${attempt + 1}/${refreshDelays.length} with ${refreshDelays[attempt]}ms delay.`, `[SIMULATOR] Screen blank and BLOCKED. Attempting SIGWINCH refresh ${attempt + 1}/${refreshDelays.length} with ${refreshDelays[attempt]}ms delay.`,
); );
try { try {
// SIGWINCH DISABLED: process.kill(0, 'SIGWINCH'); process.kill(0, 'SIGWINCH');
} catch { } catch {
// SIGWINCH DISABLED: process.kill(process.pid, 'SIGWINCH'); process.kill(process.pid, 'SIGWINCH');
} }
await new Promise((resolve) => await new Promise((resolve) =>
setTimeout(resolve, refreshDelays[attempt]), setTimeout(resolve, refreshDelays[attempt]),
@@ -203,9 +203,9 @@ export class UserSimulator {
'[SIMULATOR] Screen is blank but system is BLOCKED. Sending SIGWINCH refresh.', '[SIMULATOR] Screen is blank but system is BLOCKED. Sending SIGWINCH refresh.',
); );
try { try {
// SIGWINCH DISABLED: process.kill(0, 'SIGWINCH'); process.kill(0, 'SIGWINCH');
} catch { } catch {
// SIGWINCH DISABLED: process.kill(process.pid, 'SIGWINCH'); process.kill(process.pid, 'SIGWINCH');
} }
return; return;
} }