From: https://github.com/microsoft/node-pty/pull/868#discussion_r2687279137
From: #868 (comment)