()
| 414 | |
| 415 | // Set up resume handler |
| 416 | const resumeHandler = () => { |
| 417 | // Restore raw mode to exact previous state |
| 418 | for (let i = 0; i < rawModeCountBeforeSuspend; i++) { |
| 419 | if (this.isRawModeSupported()) { |
| 420 | this.handleSetRawMode(true); |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | // Hide cursor (unless in accessibility mode) and re-enable focus reporting after resuming |
| 425 | if (this.props.stdout.isTTY) { |
| 426 | if (!isEnvTruthy(process.env.CLAUDE_CODE_ACCESSIBILITY)) { |
| 427 | this.props.stdout.write(HIDE_CURSOR); |
| 428 | } |
| 429 | // Re-enable focus reporting to restore terminal state |
| 430 | this.props.stdout.write(EFE); |
| 431 | } |
| 432 | |
| 433 | // Emit resume event for Claude Code to handle |
| 434 | this.internal_eventEmitter.emit('resume'); |
| 435 | process.removeListener('SIGCONT', resumeHandler); |
| 436 | }; |
| 437 | process.on('SIGCONT', resumeHandler); |
| 438 | process.kill(process.pid, 'SIGSTOP'); |
| 439 | }; |
nothing calls this directly
no test coverage detected